Hey i have a problem...
I want a plugin for my deathmatch server... But its complicated...
I want when a CT Kills a T:
-The CT next round Will be moved to T
-The T next round Will be moved to CT
I have this code but is bugged...
I mean when CT Kills T: the CT next round moved to T but the T isn't moved to CT
Code for fixing:
PHP Code:
#include <amxmodx>
#include <cstrike>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "oxygen"
new nextct[33]
new nextt[33]
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)
new killername[33], victimname[33]
get_user_name(iKiller,killername,32)
get_user_name(iVictim,victimname,32)
switch(cs_get_user_team(iVictim))
{
case CS_TEAM_T:
{
nextct[iVictim] = true
nextt[iKiller] = true
}
}
}
public logevent_round_end()
{
new players[32], pnum, tempid
get_players(players, pnum, "a");
for( new i; i<pnum; i++ )
{
tempid = players[i];
if(nextt[tempid])
{
cs_set_user_team(tempid, CS_TEAM_T)
}
if(nextct[tempid])
{
cs_set_user_team(tempid, CS_TEAM_CT)
}
}
}
__________________