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!