Code: Select all
public count(tid){ static id id = tid-TID_RESP if(!is_user_connected(id) || is_user_alive(id) || (!gInfected[id])) return g_timeleft[id] -= 1 if(g_timeleft[id] <= 0){ set_pev(id,pev_deadflag,DEAD_RESPAWNABLE); set_task(0.2, "respawn", id) set_task(0.4, "respawn", id) return }else{ set_task(1.0, "count", TID_RESP+id) } if(is_user_bot(id)) return set_hudmessage( 200, 0, 0, -1.0, 0.29, 1, 6.0, 12.0 ) format(g_msg, 63, "You will respawn in %d seconds.", g_timeleft[id]) ShowSyncHudMsg(id, g_HudSync, g_msg)} public respawn(id){ if(!is_user_connected(id) || is_user_alive(id) || (!gInfected[id])) return dllfunc(DLLFunc_Spawn, id)}