 |
|
Senior Member
|

06-07-2018
, 15:18
Re: Switch Teams on T win?
|
#6
|
Quote:
Originally Posted by instinctpt1
PHP Code:
#include <amxmodx>
#include <cstrike>
new bool: terrorWon
public plugin_init()
{
register_plugin("Swap on T Win", "1.0", "DiGiTaL")
register_event("SendAudio", "TerrorWon", "a", "2=%!MRAD_terwin");
register_logevent( "LogeventEndRound", 2, "1=Round_End" )
}
public TerrorWon() terrorWon = true;
public LogeventEndRound()
{
if(terrorWon)
{
new players[32], iNum, x
get_players(players, iNum)
for(new i=0; i < iNum; i++)
{
x = players[i]
switch(cs_get_user_team(x))
{
case CS_TEAM_T: cs_set_user_team(x, CS_TEAM_CT)
case CS_TEAM_CT: cs_set_user_team(x, CS_TEAM_T)
}
}
terrorWon = false;
}
}
|
Doesnt seem to work correctly. Shouldn't you turn around the cs_set_user_team?
__________________
Hello!
I'm learning AMXX right now, so please No Hate if i suck 
-----------------------------------------------------------------------
Check out my Furien Mod v0.3 here
|
|
|
|