AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Log Events... (https://forums.alliedmods.net/showthread.php?t=19274)

Zenith77 10-13-2005 00:25

Log Events...
 
What are the log events for the following...



CT rescure hostie
T plant bomb

T win
Ct win

thnx :)

v3x 10-13-2005 00:31

http://forums.alliedmods.net/showthr...=152515#157699

Code:
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin") register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")

Batman/Gorlag 10-13-2005 01:50

Again you can always use my helpful_message plugin, pretty helpful.

jtp10181 10-13-2005 08:07

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.


All times are GMT -4. The time now is 23:44.

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