So, I have a VIP plugin that respawns player once in a round. Thats what it should do and it worked for sometime, but now, it has stoped working for some players.
PHP Code:
new team = get_user_team(id)
new players[32]
new num = 0
if(team == 2)
get_players(players,num,"ae","CT")
else if(team == 1) get_players(players,num,"ae","TERRORIST")
if(num >= 1)
{
ExecuteHamB(Ham_CS_RoundRespawn, id)
g_DidDie[id] = true
vip_glow(id, 1)
static Float:originF[3]
pev(id, pev_origin, originF)
emit_sound(id,CHAN_BODY,SOUND_EXPLODE,VOL_NORM,ATTN_NORM,0,PITCH_NORM)
entity_blast(originF)
}
else ColorChat(id, NORMAL, "CANT SPAWN")
It gives that CANT SPAWN message so they cant spawn, but it sure is that there is alive >=1 player for that team. Whats wrong? I think it is that get_players, but why and why now as it worked before just fine?
__________________