Raised This Month: $ Target: $400
 0% 

Exec command ONCE after chosing a team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DeLiriuM
Senior Member
Join Date: Dec 2006
Old 04-15-2012 , 13:19   Re: Exec command ONCE after chosing a team
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Untested
PHP Code:

#include <amxmodx>

new bool:g_bJoinedTeam33 ];

public 
plugin_init() 
{
    
register_event"TeamInfo" "fw_EvTeamInfo" "a" );
}

public 
client_disconnectid )
{
    
g_bJoinedTeamid ] = false;
}

public 
fw_EvTeamInfo()
{
    new 
iPlayer read_data);
    
    if ( !
g_bJoinedTeamiPlayer ] )
    {
        new 
szTeam];
        
read_dataszTeam charsmaxszTeam ) );
        
        switch ( 
szTeam] )
        {
            case 
'T' 'C'
            {
                
//Put your code here, add 'S' if you also want to hook Spectator join
                
                
g_bJoinedTeamiPlayer ] = true;
            }
        }    
    }

Works like a charm. Only problem is that it doesn't wait to choose a skin.
__________________
DeLiriuM is offline
 



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 07:48.


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