I have this code that is supposed to lock players down to their team for one minute if they are transferred/call a vote to even teams to help prevent abuse, but unfortunately, implementing this broke the teambalancer because the teambalancer sends players to other teams using client_cmd(id, "jointeam %d", team) but this fails because the teamlock has already been activated (for 0.1-0.3s depending on lag) other than using a set_task is there any way I can make this code wait until the user is on the other team?
its being used properly, but the
PHP Code:
stock fm_set_user_team( id, team )
{
client_print(0, print_chat, "transferring: %d:%d %f", id, team, get_gametime())
client_cmd(id, "jointeam %d", team)
if(get_pdata_int(id, pev_team) == team)
g_teamlock[id] = get_gametime()
else
client_print(0, print_chat, "error: could not switch teams.")
}
__________________