AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [ANY] Generic event output and logging (https://forums.alliedmods.net/showthread.php?t=166165)

Peace-Maker 08-31-2011 10:39

[ANY] Generic event output and logging
 
1 Attachment(s)
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!

Thrawn2 08-31-2011 11:06

Re: [ANY] Generic event output and logging
 
nice. thank you!

Despirator 08-31-2011 13:56

Re: [ANY] Generic event output and logging
 
useful one

Antithasys 08-31-2011 16:57

Re: [ANY] Generic event output and logging
 
Very nice! :mrgreen:

TnTSCS 08-31-2011 19:00

Re: [ANY] Generic event output and logging
 
awesome - thank you very much :)

kossolax 09-01-2011 16:03

Re: [ANY] Generic event output and logging
 
Thanks

ZzZombo 05-20-2012 03:37

Re: [ANY] Generic event output and logging
 
Does this works with Left 4 Dead?


All times are GMT -4. The time now is 08:21.

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