Raised This Month: $ Target: $400
 0% 

Log Events...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 10-13-2005 , 08:07  
Reply With Quote #1

I hate catching audio/text events, so lame.... blah

Heres how I did it, it can also be done using register_logevent

Code:
public plugin_log() {     new logdata0[128], logdata1[64], logdata2[64], logdata3[64]     new name[32], id     //Get the args from the log data     read_logargv(0,logdata0,127)     read_logargv(1,logdata1,63)     read_logargv(2,logdata2,63)     read_logargv(3,logdata3,63)     //Individual Events     if (equal(logdata1,"triggered")) {         //Get the username and id out         parse_loguser(logdata0, name, 31)         id = get_user_index(name)         //Hostage Events         if (equal(logdata2,"Rescued_A_Hostage")) {             hostRescued(id)         }         else if (equal(logdata2,"Killed_A_Hostage")) {             hostKilled(id)         }         //Bomb Events         else if (equal(logdata2,"Spawned_With_The_Bomb")) {             bombHolder(id)         }         else if (equal(logdata2,"Got_The_Bomb")) {             bombHolder(id)         }         else if (equal(logdata2,"Planted_The_Bomb")) {             bombPlanted(id)         }         else if (equal(logdata2,"Defused_The_Bomb")) {             bombDefused(id)         }     }     //Team Events     else if (equal(logdata3,"All_Hostages_Rescued")) {         allHostRescued()     }     else if (equal(logdata3,"Target_Bombed")) {         bombExploded()     } }

when you see things like "hostRescued(id)" that is me calling another function to handle the event. You can pick and choose which ones to catch. plugin_log is a forward so it gets called automatically with each log event.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Reply



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 23:44.


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