Raised This Month: $12 Target: $400
 3% 

[ANY] Generic event output and logging


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 08-31-2011 , 10:39   [ANY] Generic event output and logging
Reply With Quote #1

Generic event output and logging

This is for use to observe and debug events fired by a game. It logs them all to a file called event_log.log in sourcemod/logs including the whole data and types.

Example log:
Code:
L 08/31/2011 - 16:18:26: [logevents.smx] Fired event "server_cvar" ("cvarname"(string) = "bot_quota") ("cvarvalue"(string) = "2")
L 08/31/2011 - 16:18:26: [logevents.smx] Fired event "player_disconnect" ("userid"(short) = "3") ("reason"(string) = "Kicked by Console") ("name"(string) = "Harold") ("networkid"(string) = "BOT")
L 08/31/2011 - 16:18:26: [logevents.smx] Fired event "bomb_dropped" ("userid"(short) = "3")
L 08/31/2011 - 16:18:26: [logevents.smx] Fired event "player_team" ("userid"(short) = "3") ("team"(byte) = "0") ("oldteam"(byte) = "2") ("disconnect"(bool) = "true") ("autoteam"(bool) = "false") ("silent"(bool) = "false") ("name"(string) = "Harold")
L 08/31/2011 - 16:18:26: [logevents.smx] Fired event "cs_win_panel_round" ("show_timer_defend"(bool) = "false") ("show_timer_attack"(bool) = "true") ("timer_time"(short) = "93") ("final_event"(byte) = "9") ("funfact_token"(string) = "#funfact_fallback1") ("funfact_player"(short) = "0") ("funfact_data1"(long) = "0") ("funfact_data2"(long) = "0") ("funfact_data3"(long) = "0")
L 08/31/2011 - 16:18:26: [logevents.smx] Fired event "round_end" ("winner"(byte) = "1") ("reason"(byte) = "9") ("message"(string) = "#Round_Draw")
L 08/31/2011 - 16:18:33: [logevents.smx] Fired event "round_start" ("timelimit"(long) = "300") ("fraglimit"(long) = "0") ("objective"(string) = "BOMB TARGET")
You're able to ignore events with sm_event_ignore event_name.
PHP Code:
sm_event_ignore player_footstep 
would be a good one, to stop that spamming >.<

Thanks to psychonic for showing a way to get the value of a unknown key with the Kv* natives.

It currently parses the following files for events:
  • resource/gameevents.res
  • resource/serverevents.res
  • resource/hltvevents.res
  • resource/replayevents.res
  • resource/modevents.res
If i missed a file, please pin it up!
Attached Files
File Type: sp Get Plugin or Get Source (logevents.sp - 784 views - 5.7 KB)
__________________
Peace-Maker is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 08-31-2011 , 11:06   Re: [ANY] Generic event output and logging
Reply With Quote #2

nice. thank you!
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 08-31-2011 , 13:56   Re: [ANY] Generic event output and logging
Reply With Quote #3

useful one
Despirator is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 08-31-2011 , 16:57   Re: [ANY] Generic event output and logging
Reply With Quote #4

Very nice!
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 08-31-2011 , 19:00   Re: [ANY] Generic event output and logging
Reply With Quote #5

awesome - thank you very much
TnTSCS is offline
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 09-01-2011 , 16:03   Re: [ANY] Generic event output and logging
Reply With Quote #6

Thanks
kossolax is offline
ZzZombo
Member
Join Date: May 2012
Location: Ravenholm
Old 05-20-2012 , 03:37   Re: [ANY] Generic event output and logging
Reply With Quote #7

Does this works with Left 4 Dead?
ZzZombo is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode