i want all bots to be at terrorist team and all real players at ct team. so far, i've got this:
Code:
public TeamCheck(players[]) {
new players[32],num,i
get_players(players,num)
for(i = 0; i <= num; i++) {
new id = players[i]
if (is_user_bot(id) && cs_get_user_team(id) == CS_TEAM_CT) {
cs_set_user_team(id,CS_TEAM_T)
set_cvar_num("sv_restartround", 1)
problem occurs, when real player joins terrorist team. i was thinking of something like this:
Code:
else {
cs_set_user_team(id,CS_TEAM_CT)
}
}
return PLUGIN_CONTINUE
}
or
Code:
public TeamCheck(players[]) {
new players[32],num,i
get_players(players,num)
for(i = 0; i <= num; i++) {
new id = players[i]
new t_players, bot_num, t_rplayers
t_players = get_playersnum(CS_TEAM_T)
bot_num = get_cvar_num("bot_quota")
t_rplayers = t_players - bot_num
// then it would find the real player and throw him to cts
}
}
any suggestions? thanks