EventScripts Forums
Mattie's EventScripts and Source Forums
Mattie recommends...
Premier Sponsor:Platinum Sponsor:
 
Script Categories
16000 (15) abilities (15) addon (71) addons (17) admin (348) admins (23) advert (27) adverts (26) afk (17) alerts (12) ammo (25) anti (20) armor (11) auth (16) automatic (15) awp (29) ban (24) ba_jail (34) bhop (45) block (27) bomb (47) bonus (25) boost (21) bot (35) bot-management (20) bots (24) bullet (13) bunnyhop (18) Buy (27) buymenu (13) c4 (12) cash (76) Change (14) chat (75) cheat (15) clan (17) classes (24) color (30) colors (20) command (23) commands (20) config (28) configurable (11) connect (54) counter (11) Counter-Strike-Source (18) CS:S (20) css (3313) custom (13) Damage (48) database (14) dead (19) Deagle (11) death (19) deathmatch (79) deathrun (17) deutsch (13) dice (11) disconnect (24) Dissolve (12) dm (24) dod:s (11) dods (494) download (12) easy (26) effect (14) effects (125) English (16) entity (24) est (12) es_tools (14) Eventscript (12) exploit (11) flashbang (27) français (104) french (36) fun (312) funny (18) Gabeee (11) game (12) gamemode (11) gameplay (175) German (11) give (20) gravity (15) grenade (28) grenades (32) gun (15) GunGame (31) GunGame5 (11) guns (20) Hack (16) headshot (37) health (70) hegrenade (15) help (11) hit (13) hl2dm (432) HP (25) hudhint (11) hungarian (22) info (52) information (17) invisible (11) IP (13) jail (79) jailbreak (14) join (44) jump (19) kick (25) kill (50) kills (23) knife (65) leveling (38) LnD (14) lol (11) magyar (32) management (14) manager (11) mani (16) map (31) map-management (26) maps (17) match (21) Memphis-84 (13) menu (139) message (30) messaging (52) minecraft (12) mod (121) model (18) models (32) modye (16) money (50) motd (13) music (32) mute (20) nades (20) name (15) new (13) noblock (53) orangebox (23) player (46) player-management (31) player-tracking (28) popup (70) prop (13) propmenu (14) props (34) protect (11) protection (31) punish (11) punishment (51) python (79) quake (32) QuakeSounds (12) race (13) races (20) radio (29) random (47) rank (41) rates (15) rcon (12) realism (22) Regeln (22) respawn (67) restrict (40) round (26) rpg (32) rules (60) say (16) score (15) scout (29) Script (25) script-helper (25) scriptpack (33) sdk (171) server (60) server-tools (42) shop (12) showdamage (19) silly (31) simple (31) skin (17) skins (34) slay (13) soccer (14) sound (63) sounds (106) source (13) spanish (18) spawn (81) speed (25) statistics (13) stats (55) status (15) Steam (11) STEAMID (29) Superhero (15) surf (41) Team (29) team-balance (14) teleport (16) text (17) TF2 (142) time (22) timer (15) tools (15) tracers (19) triggers (11) uedi (17) uses_auth (18) vip (23) vote (39) voting (22) war (25) Warcraft (12) warcraft-source (20) wc3 (14) wcs (47) wcs:Python (32) weapon (87) weapons (116) web (16) welcome (12) wuerfeln (11) zm (26) zombie (99) zombiemod (55) zombies (12)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (20) .:modye:. (14) .eMko* (6) 101satoon101 (12) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (9) Ace Rimmer (40) adminc (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) Ayuto (5) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (8) Bioko (10) blackshoxx (9) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (32) cagemonkey (8) capo azzlack (7) captain master (6) carbon-14 (10) CaskioUTF (5) cbirou (15) CbRRR (16) ChaCaLz2psy4 (5) CharlesT (5) Chrisber (5) chrismrulz (10) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) CrAzD (6) craziest (11) dani12356 (12) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) deathx9 (5) Deathyy (16) dhack (17) Di[M]aN (12) DJ Fire-Black prod (8) DoCky (31) Don (15) dordtcore (9) DragonFreddo (8) Drassil (5) dretax14 (11) Einlanzers (47) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (10) FMIS (5) Franc1sco (17) freddukes (18) Frequency (6) Fugi91 (6) Fulmine (5) G4ME (5) GAMEREN2 (8) german9114 (13) GODJonez (40) GoodfellaDeal (5) Hansi (6) Hisoka (6) HitThePipe (7) HOLLDIDAY (24) Icetouch (6) ichthys (25) Im the new guy (14) iNexus (13) infamous1 (9) isivisi (13) ispaine (7) Jackmaster (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (11) KDBFame (6) L'In20Cible (11) L.P.H (8) Largo Usagi (10) LnD (14) Lobe (11) loKkdoKk (8) lolo-le-haricot (7) LosNir (5) Lumpi@Work (9) M4rc3L-XCN (7) macshot (7) magyar-oneill (9) Matth (7) Mattie (21) mave1993 (5) MBchrono (15) McFly (20) Medda (5) Memphis-84 (15) Messiah93 (19) Mickyy (5) micmacx (6) Mitchell (5) Mixer57 (5) modye (6) Monster_Bitch1 (9) Mordavolt (7) motomoto (10) MrScriptaz (6) mryoung (6) MyTechZone.de (8) Nicolous (23) ojii (31) oliVier (10) Omega68 (6) Omega_K2 (11) Owned|Myself (8) P3N (7) pand3mic (6) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) pinkyyy -.- (5) pitbull0993 (7) PixelGamer (7) randomknifer (9) Raptor150 (31) Ratzee (6) ReaCtioN2oo9 (6) RedCliff (5) Rennnyyy (17) revolutionfighters (8) RideGuy (12) Rio (9) Roeliekt (6) roof (16) runamagic (13) Ryezin (5) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (15) sgt.angel (6) Shad0w (11) ShoTaXx# (7) sicilia (7) sicman_adrian (22) skillz92 (7) sn4k3 (18) Snake12 (7) snake38 (10) sonicsight (7) SpeedFreak (9) spoonman184 (10) stabby (22) stas (27) Stirni (6) stonedegg (7) Strontium Dog (30) SumGuy14 (25) SuperDave (49) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (27) TheDonFather (5) theresthatguy (6) Tiny Tod (7) tooshkan4uk (8) Totyahun (9) uedi (38) ultimatebuster (6) Undead (25) usernamesaretaken (15) wanted241 (9) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) Wundermaxe (5) X-Mania (5) XE_ManUp (14) xfalcon61 (5) zSweetXz (5) ZZMatty (6) [Cs]Lord_Inferno2 (11) [DAP]Kickbutt (5) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Go to page 1, 2, 3  Next
Author Message
User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-27, 1:07 am 
   Post subject: WeaponStats release 2

Version 3 alpha available: http://forums.mattie.info/cs/forums/viewtopic.php?p=223287#223287

---

This script keeps kills, headshot kills, deaths, and headshot deaths statistics for each weapon for each player. Only authorized players will have statistics kept. Requires EventScripts v1.5+

This script also requires an auth provider loaded to function. This script provides information for setting up basic auth, but the best resource for EventScripts v1.5 Authorization is here: http://www.eventscripts.com/pages/Authorization_FAQ

This script affects gameplay in the following ways:
*This script keeps track of the number of kills, headshot kills, deaths, and headshot deaths from each weapon for authorized players (default #all).
*Statistics for all players can be shown to authorized players (default #all) using a client command (default !stats).
*Statistics for a specific player can be shown to authorized players (default #all) using the same client command (default !stats [player name]). Placing an @ before the player's name will allow you to use a partial name that will return up to one player.
*Statistics for a specific player can be removed or reset by authorized players (default #admin) using another client command (default !removestats <player name>).
*Statistics for each player can be displayed on his or her console on every spawn and/or every death (default both).
*Brief statistics for each player can be displayed in a popup on every spawn and/or every death (default both).
See the options below for further details.


Here is a picture of the statistics popup:
Image

If you would like statistics to be kept per round or to set starting health based on statistics, please see RegenMod.

---

Thanks to [CBW]Valor for this suggestion. That post can be found here:
http://forums.mattie.info/cs/forums/viewtopic.php?t=13983

---

Release 2:
New features in release 2:
- Stats will only be kept for authorized players.
- View stats trigger and remove stats trigger are now client commands (for use in the console).
- View stats command now supports partial names when the partial name is preceded with an @. Due to speed concerns, this will only return one player. Ex: !stats @SuperD can return stats for SuperDave.
- View stats command now also supports names with spaces without the need for quotation marks.
- WeaponStats now supports automatically displaying each player's stats on his or her console on every spawn and/or every death.
- WeaponStats now supports automatically displaying a breif overview of player's stats in the form of a popup on every spawn and/or every death.
- Major reduction in server console errors from loading keygroups.
Release 2 introduces the following options: weaponstats_keepstatspermission weaponstats_guistatsondeath weaponstats_guistatsonspawn weaponstats_autostatsondeath weaponstats_autostatsonspawn

ES:
    // Config/Options





    // *****TRIGGER OPTIONS*****



       es_xset weaponstats_stattrigger "!stats"

    // Players that say this will be given a list of all players for whom stats are kept

    // [default "!stats"]

    // Players that say this followed by another player's name will be given a list of the latter

    // player's stats

    // You may put an @ before the player's name to use a partial name which, due to speed concerns,

    // will only return one player

    // WARNING: Using this option can cause major lag when many players are stored!



       es_xset weaponstats_removetrigger "!removestats"

    // Players that say this followed by another player's name will remove the latter player from the

    // stats list [default "!removestats"]



       es_xset weaponstats_guistatsondeath 30

    // Set to the number of seconds players will be shown the black stat box after death--0 will

    // eliminate [default 30]

    // NOTE: When on, players with stats will have their stats sent to them REGARDLESS of the stat

    // trigger permission!



       es_xset weaponstats_guistatsonspawn 15

    // Set to the number of seconds players will be shown the black stat box after spawn--0 will

    // eliminate [default 15]

    // NOTE: When on, players with stats will have their stats sent to them REGARDLESS of the stat

    // trigger permission!





    // *****PERMISSION OPTIONS*****

    // Acceptable values are: "#all" - All players, "#known" - All players with a valid SteamID,

    // "#poweruser" - Players you have designated in your authorization provider as "power users" or

    // "admin", "#admin" - Players you have designated as "admin"



       es_xset weaponstats_keepstatspermission "#all"

    // Players must have this permission level for stats to be kept for that player [default "#all"]



       es_xset weaponstats_stattriggerpermission "#all"

    // This is the permission level of the weaponstats_stattrigger command [default "#all"]



       es_xset weaponstats_removetriggerpermission "#admin"

    // This is the permission level of the weaponstats_stattrigger command [default "#admin"]





    // *****MISCELLANEOUS OPTIONS*****

    // For these options, 0 = off and 1 = on



       es_xset weaponstats_announcetriggerondeath 1

    // When 1, players will be shown how to display stats after every death [default 1]



       es_xset weaponstats_autostatsondeath 1

    // When 1, players will have their stats sent to their console automatically after death

    // [default 1]

    // NOTE: When on, players with stats will have their stats sent to them REGARDLESS of the stat

    // trigger permission!



       es_xset weaponstats_announcetriggeronspawn 0

    // When 1, players will be showen how to display stats after every spawn [default 0]



       es_xset weaponstats_autostatsonspawn 1

    // When 1, players will have their stats sent to their console automatically after spawn

    // [default 1]

    // NOTE: When on, players with stats will have their stats sent to them REGARDLESS of the stat

    // trigger permission!



       es_xset weaponstats_botstats 0

    // Set to 1 to save stats for bots [default 0]





    // *****AUTHORIZATION INFORMATION*****

    // The best resource for authorization information is here:

    // <!-- m --><a class="postlink" href="http://www.eventscripts.com/pages/Authorization_FAQ">http://www.eventscripts.com/pages/Authorization_FAQ</a><!-- m -->

    // Please check there first if you have questions!



    // If you don't know anything about authorization and wish to restrict some of the commands in this

    // script, you may do so by removing

    // the "//" from the beginning of the following two lines:



    //   es_xload examples/auth/basic_auth

    //   es_xset BASIC_AUTH_ADMIN_LIST "STEAM_ID_LAN;"



    // You must then change BASIC_AUTH_ADMIN_LIST so that it contains the SteamIDs of the users you want

    // to designate as "#admin"

    // Separate each SteamID with a semicolon



     
For more quality scripts, please check out CSSoundtrack (music that changes based on gameplay), CheapBombTimer, GunMod (a rewrite of the popular GunGame), and my many others!

>>>Is this script optimized? (Thanks Chun!)<<<


Last edited by SuperDave on 2008-07-22, 12:12 pm, edited 12 times in total.




User avatar
Reader
Profile

Posts: 118
Location:
Chicago, Illinois
 
New postPosted: 2007-05-27, 1:53 am 

Very nice script, this is going on both of JOV's servers tomorrow. +w00t

_________________
[url=http://addons.eventscripts.com/addons/user/2238][img]http://addons.eventscripts.com/addons/userbar/2238/banner.png[/img][/url]
[url=http://www.gametracker.com/server_info/205.234.153.2:27015/][img]http://cache.www.gametracker.com/server_info/205.234.153.2:27015/b_560_95_1.png[/img][/url]


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-27, 2:02 am 

Thanks.

The next step is using auth to decide which players have stats kept.

Oh *bites tongue*-- it says it does that now, doesn't it? :oops:

I hope you like it as much with that changed. I'd like to wait to see if there are any suggestions before implementing the stat-keeping auth.

Speaking of which, do you have any suggestions?
- Dave


User avatar
Reader
Profile

Posts: 118
Location:
Chicago, Illinois
 
New postPosted: 2007-05-27, 2:08 am 

Maybe have a command where you can type something like !top glock and it will give you the top 10 glock ratio people, and same for other guns. Depending on how you did the keygroups, this should be fairly easy.

_________________
[url=http://addons.eventscripts.com/addons/user/2238][img]http://addons.eventscripts.com/addons/userbar/2238/banner.png[/img][/url]
[url=http://www.gametracker.com/server_info/205.234.153.2:27015/][img]http://cache.www.gametracker.com/server_info/205.234.153.2:27015/b_560_95_1.png[/img][/url]


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-27, 2:40 am 

Good suggestion. Implementing that would also make !top total work which was another plan of mine.

I also forgot that I planned to include a ratio of some sort with the statistics. :)

In addition, I'd like to hear if anyone finds problems in the code. This script wasn't hard, but it was tedious.
- Dave


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2007-05-27, 8:04 am 

i love it very nice dave

_________________
Image

Nacht der lebenden Toten


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 6777
Location:
The Valley of The Dolls
 
New postPosted: 2007-05-27, 9:37 am 

Very nice Dave. If I ran a public server I would probably use this.

_________________
The day Microsoft starts making vacuums is the day they make something that doesn't suck!
----------------------------------------------------------------------------
"Government is not the solution to our problems, Government IS the problem."
-Ronald Reagan
----------------------------------------------------------------------------
"Be who you are and say what you mean because those who matter don't mind and those who mind don't matter."
...-Dr. Seuss
----------------------------------------------------------------------------


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-27, 12:24 pm 

Many thanks to you both!

Don-- That means a lot. :)

Although, I think this script is best on private servers (at least for now) because private servers will simply have less players to deal with. It should work on LANs even though (as I understand it) all players will be considered admins.

If you have any suggestions please let me know!
- Dave


User avatar
Regular
Profile

Posts: 125
 
New postPosted: 2007-05-27, 5:19 pm 

Awesome awesome script.
W00t :-)

_________________
Image


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-27, 6:03 pm 

Glad you approve! I wish it wouldn't have taken this long, though :)

I'm going to implement a !top function in a bit, do you have any other suggestions?
- Dave


User avatar
Newbie
Profile

Posts: 45
 
New postPosted: 2007-05-28, 10:25 am 

would it be possible to have a gui popup automatically when you die and at the end of the round with these stats for the round?


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-28, 4:49 pm 

The problem with making a GUI for this script is that there are too many stats to display (I'd have to make a dynamically sized menu). Having a GUI for totals pop up when a player dies or survives the round is a wonderful idea, though. I'll be sure to include that in release 2 :)

I'm always open to more thoughts or suggestions!
- Dave


User avatar
Regular
Profile

Posts: 125
 
New postPosted: 2007-05-28, 5:39 pm 

i dont quite get the auth thing.

i checked out the FAQ but even that seems... sketchy.
do i need to add anymore folders? txt or cfgs for this auth?
do i just need to add admin steamids, or everyones steamid that wants their stats to show up?

_________________
Image


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-28, 5:52 pm 

First off [CBW]Valor, thank you so much for checking the FAQ first. That makes my life easier :D

[CBW]Valor wrote:
do i need to add anymore folders? txt or cfgs for this auth?
Uncomment the following lines in the options as such:
ES:
       es_xload examples/auth/basic_auth

       es_xset BASIC_AUTH_ADMIN_LIST "STEAM_ID_LAN;"
This requires ./cstrike/addons/eventscripts/examples/auth/basic_auth/es_basic_auth.txt which comes in the EventScripts v1.5 zip. The SteamIDs you add to BASIC_AUTH_ADMIN_LIST will be able to use the commands you designate as "#admin".

Stats will be kept for all players who connect.

Hope this helps!
- Dave


User avatar
Regular
Profile

Posts: 125
 
New postPosted: 2007-05-28, 6:33 pm 

alright.
found the basic auth. do i have to add admins for the script to work? or is that just for if we want to reset peoples stats?

do i need to add anything to my autoexec for the auth?

as of right now. everything else is in, and !stats is on the server. but when !stats is typed. nothing comes up.

_________________
Image


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-28, 6:48 pm 

If you uncomment those lines in the script it should be enough. You need to uncomment them even if you don't want to use the admin feature.

I'd like to know if this problem continues for you as well as if any console errors are generated. Of course, I hope you're not using this on the infamous broken machine.
- Dave


User avatar
Regular
Profile

Posts: 125
 
New postPosted: 2007-05-28, 7:33 pm 

lol. i fixed that. thx to the help.

so what do you mean by uncomment?

_________________
Image


User avatar
Mentat Philosopher
Mentat Philosopher
Profile

Posts: 15258
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-28, 7:41 pm 

Uncomment = Remove the "//" on that line.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group