Raised This Month: $ Target: $400
 0% 

Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 01-28-2010 , 07:44   Event
Reply With Quote #1

Can somebody expalin me this 2 event's? Couse now event works only for wining team. And i whana that it work for bouth teams... Lossing team and winning team...

PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w"
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
floatman
Senior Member
Join Date: Oct 2009
Location: nowhere.
Old 01-28-2010 , 07:48   Re: Event
Reply With Quote #2

http://wiki.alliedmods.net/Half-Life_1_Game_Events
__________________

floatman is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 01-28-2010 , 07:54   Re: Event
Reply With Quote #3

I dont see at there usefull information about this 2 event's...
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-28-2010 , 08:29   Re: Event
Reply With Quote #4

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
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 01-28-2010 , 10:41   Re: Event
Reply With Quote #5

Arguments rocks =] but still i dont get it why whit this even's only winning team get event not bouth teams ;/
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-28-2010 , 11:22   Re: Event
Reply With Quote #6

show your code
__________________
Bugsy is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 01-28-2010 , 12:17   Re: Event
Reply With Quote #7

PHP Code:
public event_new_round() 
{
    
round++;
    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        if(
get_user_flags(player) & ADMIN_LEVEL_H)
        {
        if (!
get_pcvar_num(g_menu_active))
            return 
PLUGIN_CONTINUE
        
if(round 2)
        {
            
Showrod(player);
        }
        }
    }
    return 
PLUGIN_HANDLED
}

public 
Event_RoundRestart(id)
{
    
round=0;

__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
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 18:16.


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