Raised This Month: $ Target: $400
 0% 

Solved Stop players from re-joining team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sinisuba
Member
Join Date: Oct 2014
Location: Bosnia & Herzegovina
Old 02-05-2017 , 12:13   Stop players from re-joining team
Reply With Quote #1

EDIT: Solved




When a player switches team, he can do it again forever. I want him to switch team and can't re-join again (in that same round).

Code:
public submenu_handler( id, menu, item )
 {
    switch( item )
    {
        case 0:
        {
            if(cs_get_user_team(id) != CS_TEAM_T)
            {
                cs_set_user_team(id, CS_TEAM_T)
                user_kill(id, 1)
            }
        }
        case 1:
        {
            if(cs_get_user_team(id) != CS_TEAM_CT)
            {
                cs_set_user_team(id, CS_TEAM_CT)
                user_kill(id, 1)
            }
        }
        case MENU_EXIT:
        {
            if ( is_user_connected( id ) )
                JailMenu( id );
        }
    }
}

Last edited by Bugsy; 02-05-2017 at 17:09.
sinisuba 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 21:00.


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