Raised This Month: $ Target: $400
 0% 

Switch Teams on T win?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-08-2018 , 00:44   Re: Switch Teams on T win?
Reply With Quote #1

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