Raised This Month: $ Target: $400
 0% 

Solved Stop players from re-joining team


Post New Thread Reply   
 
Thread Tools Display Modes
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
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-05-2017 , 12:20   Re: Stop players from re-joining team
Reply With Quote #2

Create a bool and set true when he does that, if he tries again return PLUGIN_HANDLED.
__________________
edon1337 is offline
sinisuba
Member
Join Date: Oct 2014
Location: Bosnia & Herzegovina
Old 02-05-2017 , 12:54   Re: Stop players from re-joining team
Reply With Quote #3

How would i do that
sinisuba is offline
Old 02-05-2017, 13:03
Natsheh
This message has been deleted by Natsheh.
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-05-2017 , 13:17   Re: Stop players from re-joining team
Reply With Quote #4

It's Scripting section, you have to figure it out yourself.

Quote:
Originally Posted by Natsheh View Post
By registering the message
Hooking

Msgid 114 for VGUIMenu
Msgid 96. For old menu

And check arguments etc..
What?
__________________
edon1337 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-05-2017 , 14:01   Re: Stop players from re-joining team
Reply With Quote #5

i miss understanding ..,.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Old 02-05-2017, 16:32
sinisuba
This message has been deleted by sinisuba.
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 21:00.


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