|
public round_end()
{
g_round++
if(g_round % get_pcvar_num(g_pcvar_tcl))
{
change_team(1)
}
}
public change_team(id)
{
if(is_user_connected(id))
{
new CsTeams:team
team = cs_get_user_team(id)
if(team == CS_TEAM_T)
cs_set_user_team(id, CS_TEAM_CT)
else if(team == CS_TEAM_CT)
cs_set_user_team(id, CS_TEAM_T)
if(is_user_alive(id))
user_silentkill(id)
}
new next = id + 1
while(next <= g_maxplayers)
{
if(is_user_connected(next))
{
set_task(0.1, "change_team", next)
break
}
else next++
}
} 参考了一下jim_yang老大的帖子,没看懂,请问逐个执行加钱怎么写呢?谢谢 |
|