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

[ANY] Generic event output and logging


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 - 794 views - 5.7 KB)
__________________
Peace-Maker is offline
 



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 06:34.


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