Can you explain why you have the get_players() player-id array index as a factor in the set_task() interval?
Code:
new i
for (i = 0; i < playercount; i++)
{
new id = players[i]
if (!is_user_hltv(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR)
{
cs_set_user_team(id, CS_TEAM_SPECTATOR)
new data[2]
data[0] = id
data[1] = i
set_task((1.0 * i) + 4.0, "assignUserTeam", _, data, sizeof(data))
}
}
set_task((1.0 * i) + 4.0, "restartRound")
1 x anything = anything. So assuming a 6 player game, players will be moved 1 second apart, starting at 4 seconds. Is this done intentionally?
Code:
(1 x 0) + 4 = 4 seconds
(1 x 1) + 4 = 5 seconds
(1 x 2) + 4 = 6 seconds
(1 x 3) + 4 = 7 seconds
(1 x 4) + 4 = 8 seconds
(1 x 5) + 4 = 9 seconds
__________________