i dont know if this is correct but i tested with bots and when you kill someone what ever team they were on they switch next round... and you also switch on next round....
and if you didnt kill anyone then you dont switch...
this what you want?
PHP Code:
#include <amxmodx>
#include <cstrike>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "oxygen"
new NRTS[33] = false;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "Event_DeathMsg", "a")
register_logevent("logevent_round_end", 2, "1=Round_End")
}
public Event_DeathMsg()
{
new iKiller = read_data(1)
new iVictim = read_data(2)
NRTS[iKiller] = true;
NRTS[iVictim] = true;
set_task(1.0, "Change_Teams", iVictim)
}
public logevent_round_end()
{
new players[32], pnum, tempid
get_players(players, pnum, "ac", "CT");
for( new i = 0; i<pnum; i++ )
{
tempid = players[i];
set_task(1.0, "Change_Teams", tempid)
}
}
public Change_Teams(id)
{
if(NRTS[id])
{
switch(cs_get_user_team(id))
{
case CS_TEAM_CT: cs_set_user_team(id, CS_TEAM_T);
case CS_TEAM_T: cs_set_user_team(id, CS_TEAM_CT);
}
}
}
__________________