Raised This Month: $ Target: $400
 0% 

Switch Teams on T win?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-07-2018 , 10:46   Re: Switch Teams on T win?
Reply With Quote #1

What you mean? Swap players team on every time a team win the round, or only in the first time?
__________________








CrazY. is offline
ImYourBro
Senior Member
Join Date: Jun 2014
Old 06-07-2018 , 15:22   Re: Switch Teams on T win?
Reply With Quote #2

Quote:
Originally Posted by CrazY. View Post
What you mean? Swap players team on every time a team win the round, or only in the first time?
Every time Terrorist wins, teams should we swapped. When CT wins, nothing should happen
__________________
Hello!
I'm learning AMXX right now, so please No Hate if i suck

-----------------------------------------------------------------------
Check out my Furien Mod v0.3 here

ImYourBro is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-08-2018 , 00:44   Re: Switch Teams on T win?
Reply With Quote #3

Quote:
Originally Posted by ImYourBro View Post
Every time Terrorist wins, teams should we swapped. When CT wins, nothing should happen
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define isTeam(%0)         (CS_TEAM_T <= cs_get_user_team(%0) <= CS_TEAM_CT)

new bool:TWin
public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("SendAudio""EventTRWin","a""2&%!MRAD_terwin")
    
register_event("HLTV","EventNewRnd""a""1=0""2=0")
    
register_logevent"LogeventEndRound"2"1=Round_End" 
}

public 
EventTRWin()
    
TWin true

public EventNewRnd()
    
TWin false
    
public LogeventEndRound()
{
    if(
TWin)
    {
        new 
iPlayers[MAX_PLAYERS], iNum
        get_players
(iPlayersiNum"ch")
        for(new 
iidiNum;i++)
        {
            
id iPlayers[i]
            
            if(
isTeam(id))
                
cs_set_user_team(id, (cs_get_user_team(id) == CS_TEAM_T) ? CS_TEAM_CT CS_TEAM_T)
        }
    }

iceeedr is offline
Send a message via Skype™ to iceeedr
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 04:42.


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