Raised This Month: $ Target: $400
 0% 

[REQ] T swap to ct and ct no swap


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2017 , 14:51   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #11

2=%!MRAD_ctwin - you see that in the code? Change the "ct" to "ter". Simple.
__________________

Last edited by OciXCrom; 12-27-2017 at 18:25.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
ticking like a metronome
Junior Member
Join Date: Sep 2017
Old 12-27-2017 , 16:55   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #12

Quote:
Originally Posted by OciXCrom View Post
2=%!MRAD_ctwin - you see that in the code? Change the "ct" to "t". Simple.
It's not t though, but ter.
ticking like a metronome is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-27-2017 , 21:04   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #13

I tried this, it works, but not exactly what i want, this plugin also swap team if CT wins?
__________________
___________________________________________


MerreBigger is offline
ticking like a metronome
Junior Member
Join Date: Sep 2017
Old 12-28-2017 , 05:33   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #14

Quote:
Originally Posted by MerreBigger View Post
I tried this, it works, but not exactly what i want, this plugin also swap team if CT wins?
It does, if you didn't change the event parameters, otherwise - it doesn't, and you need to create a new function and register a new event (with ctwin), which calls it.

Last edited by ticking like a metronome; 12-28-2017 at 05:35.
ticking like a metronome is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-28-2017 , 09:44   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #15

Can you do it for me please? i don't understand..
__________________
___________________________________________


MerreBigger is offline
ticking like a metronome
Junior Member
Join Date: Sep 2017
Old 12-30-2017 , 17:14   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #16

Quote:
Originally Posted by MerreBigger View Post
Can you do it for me please? i don't understand..
This should do the trick:

PHP Code:
#include <amxmodx>
#include <cstrike>

#define VERSION "0.0.3"

#define MAX_PLAYERS 32

public plugin_init()  
{
    
register_plugin"Switch Teams On Ct Wins"VERSION"ConnorMcLeod" );

    
// leave both if you want teams to swap when any of the teams win
    
register_event"SendAudio""Event_SendAudio_MRAD_ctwin""a""1=0""2=%!MRAD_ctwin" ); // remove this if you only want teams to swap when Ts win
    
register_event"SendAudio""Event_SendAudio_MRAD_terwin""a""1=0""2=%!MRAD_terwin" ); // remove this if you only want teams to swap when CTs win
}

public 
Event_SendAudio_MRAD_ctwin()  
    
SwitchTeams();

public 
Event_SendAudio_MRAD_terwin()
    
SwitchTeams();

public 
SwitchTeams()
{
    new 
iPlayersMAX_PLAYERS ];
    new 
iNum;
    new 
id;

    
get_playersiPlayersiNum );

    for ( new 
0iNum; ++)  
    {
        
id iPlayers];

        switch ( 
cs_get_user_teamid ) )  
        {
            case 
CS_TEAM_T:     cs_set_user_teamidCS_TEAM_CTCS_CT_GIGN );
            case 
CS_TEAM_CT:    cs_set_user_teamidCS_TEAM_TCS_T_LEET );
        }
    }

ticking like a metronome is offline
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 02:36.


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