Raised This Month: $ Target: $400
 0% 

Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-28-2010 , 08:29   Re: Event
Reply With Quote #1

HLTV is explained in the above link:

"Note: On new round is fired with both arguments equal to 0."

register_event("HLTV", "event_new_round", "a", "1=0", "2=0")

"HLTV" is the message being hooked
"event_new_round" is the function that gets called when conditions are met
"a" means global event
"1=0","2=0" means arguments 1 and 2 must equal 0 for the event_new_round function to get fired. This signifies new round

Arguments for TextMsg: http://forums.alliedmods.net/showpos...00&postcount=5

register_event("TextMsg","Event_RoundRestart" ,"a","2&#Game_w")

Everything is the same as above except the condition. For this we are looking to only call "Event_RoundRestart" if "#Game_w" is found in the 2nd parameter of the TextMsg message.

"2&#Game_w" means the 2nd parameter must contain "#Game_w".

The two messages that will trigger our message hook are:

#Game_will_restart_in_console
#Game_will_restart_in

Hope that helps
__________________
Bugsy is offline
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 05:34.


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