Author Topic: Accuracy, Most Trigger Happy, and Most Hits  (Read 3052 times)

0 Members and 1 Guest are viewing this topic.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Accuracy, Most Trigger Happy, and Most Hits
« on: August 22, 2007, 10:14:24 pm »
Script Name: Accuracy, Most Trigger Happy, and Most Hits
Script Description:This script has the ability to show a player his accuracy and also allows everyone to view the current best accuracy, most trigger happy, and most hits. The stats are only recorded for primary weapons.
Original Author(s): EagleEye
Core Version: 2.6.2

* Script is attached


Usage:
!accuracy - Shows a player his accuracy
!stats - shows best accuracy, most trigger happy, and most hits to all players

At the end of each map it will print out the stats to everyone and reset them all


Bugs and issues I had to workaround:

There is no way to tell what weapon does the damage to another player. This caused the error with grenades adding a hit for the player. To fix this I count throwing grenades as a fired bullet.

As if grenades didn't already cause me enough trouble, they also cause the 'Ammo' in GetPlayerStat to decrease by 1 when thrown. I had to add a small workaround for this.

When you add a bot the ForceWeapon procedure isn't called. So I had to address them joining in AppOnIdle

Some guns have multiple bullets (deagles, spas), so since a player can get multiple hits from them each shot add the number of bullets to their fired amount.

The M79 can damage a player in two ways, from the blast and from the bullet itself. Because of this I had to treat the blast as a separate bullet.

A player actually drops their gun before GetPlayerStat(ID,'Alive') returns false. I had to add a small workaround for this.


The reason I posted all the bugs and issues I ran into is if someone else wants to modify it or make their own.


Hope you all enjoy it. :D


« Last Edit: August 22, 2007, 10:26:07 pm by mikembm »

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Macellan
Re: Accuracy, Most Trigger Happy, and Most Hits
« Reply #1 on: August 23, 2007, 06:12:20 am »
Interesting script :)
Nice work.
CoFounder / CTO @ Macellan
Founder Turkish Soldat Community

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: Accuracy, Most Trigger Happy, and Most Hits
« Reply #2 on: August 23, 2007, 03:45:29 pm »
Wow ausome work
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Accuracy, Most Trigger Happy, and Most Hits
« Reply #3 on: August 25, 2007, 09:53:51 am »
He told me about this, which gave me the idea to make my own custom event OnPlayerShoot, which worked out fairly well, except was buggy and impossible to unbuggy it, as far as I know.

Good job though on this script. I haven't tested it but if {SS} servers ever come back, I might put this on them. :)

Offline boomhowza

  • Major(1)
  • Posts: 10
  • Urban Ninjaz
    • Urban Ninjaz
Re: Accuracy, Most Trigger Happy, and Most Hits
« Reply #4 on: August 27, 2007, 12:12:24 am »
Awesome, this will be good for my clan server :p
Image removed, please read the forum rules.

Offline Flacid Assassin

  • Camper
  • ***
  • Posts: 450
  • Gorby The Grunt
Re: Accuracy, Most Trigger Happy, and Most Hits
« Reply #5 on: August 27, 2007, 02:26:24 am »
how do i add it to my server?