PHP Code:
register_logevent("round_end", 2, "1=Round_End")
PHP Code:
public round_end()
{
if(g_spieler_anzahl_checked == 1 && g_first_round == 1)
{
new survivor
new user_is_suvivor[33]
new user_was_CT[33]
for(new id = 1;id <= g_MaxPlayers;id++)
{
if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
{
survivor++
}
if(survivor == 1 && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
{
user_is_suvivor[id] = 1
if(is_user_alive(id))
{
cs_set_user_team(user_is_suvivor[id],CS_TEAM_CT)
}
}
if(survivor >= 2)
{
if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
{
cs_set_user_team(id,CS_TEAM_T)
user_was_CT[id] = 1
}
if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T && user_was_CT[id] == 0)
{
new name[33]
new iPlayers[ 32 ], iNum, iPlayer;
get_players( iPlayers, iNum );
iPlayer = iPlayers[ random( iNum ) ];
if(is_user_alive(iPlayer))
{
get_user_name(iPlayer,name,32)
cs_set_user_team(iPlayer,CS_TEAM_CT)
client_print(0,print_chat,"tranfered %s to CT",name)
}
}
}
}
}
}
what i want do to =
@ round end i want check all alive T's !
if is there only 1 T. then transfer the T to CT & all players to T. ( 1 CT vs. all Terrors )
if are there more Terrors alive, then set a random terror of alive terror to CT & all CTs to Terror. ( again 1 CT vs all Terrors. )
the game playe =
first round will one user tranfered to CT & he has to player vs. all Terrors. @ round end if he could kill all Terrors, he willbe stay CT & the same game agin. if 1 or more Terrors survive the round, 1 of em willbe CT & he has the chance to kill all Terrors.
i hope anyone can help me.
__________________