AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do I take the event when the player chose the team and the class? (https://forums.alliedmods.net/showthread.php?t=93774)

alan_el_more 06-02-2009 11:26

How do I take the event when the player chose the team and the class?
 
How do I take the event when the player chose the team and the class?
thanks in advance :D

xPaw 06-02-2009 11:36

Re: How do I take the event when the player chose the team and the class?
 
TeamJoin

Bugsy 06-02-2009 11:41

Re: How do I take the event when the player chose the team and the class?
 
I don't think that will catch class, just team.

alan_el_more 06-02-2009 11:47

Re: How do I take the event when the player chose the team and the class?
 
Quote:

Originally Posted by xPaw (Post 840121)
TeamJoin

register_logevent("logevent_team_join",3,"1=j oined team")

?

Bugsy 06-02-2009 11:49

Re: How do I take the event when the player chose the team and the class?
 
PHP Code:

register_event"TeamInfo" "fwPlayerJoinedTeam" "a" "2=TERRORIST" "2=CT" );

public 
fwPlayerJoinedTeam()
{
    new 
id read_data);



Hunter-Digital 06-02-2009 12:08

Re: How do I take the event when the player chose the team and the class?
 
Quote:

Originally Posted by Bugsy (Post 840128)
I don't think that will catch class, just team.

Actually it does trigger on class also

Bugsy 06-02-2009 21:51

Re: How do I take the event when the player chose the team and the class?
 
Quote:

Originally Posted by alan_el_more (Post 840115)
How do I take the event when the player chose the team and the class?

PHP Code:

new g_TeamJoin[33];

public 
plugin_init() 
{
    
register_event"TeamInfo" "fwPlayerJoinedTeam" "a" "2=TERRORIST" "2=CT" );
}

public 
client_connectid )
{
        
g_TeamJoinid ] = 0;
}

public 
fwPlayerJoinedTeam()
{
    new 
id read_data);
    
    if ( !
g_TeamJoinid ] )
    {    
        
//Joined team
        
g_TeamJoinid ] = 1;
    }
    else
    {
        
//Joined class
        
g_TeamJoinid ] = 0;
    }




All times are GMT -4. The time now is 14:05.

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