PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#define VERSION "1.0"
new Float:tasktime[33] = 3.0
public plugin_init() {
register_plugin("Respawn", VERSION, "NapoleoN#")
}
public client_putinserver(id) {
set_task(tasktime[id], "CheckRespawn", id)
}
public CheckRespawn(iPlayer) {
if(cs_get_user_team(iPlayer) != CS_TEAM_UNASSIGNED || cs_get_user_team(iPlayer) != CS_TEAM_SPECTATOR) {
ExecuteHamB(Ham_CS_RoundRespawn, iPlayer)
} else {
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
Untested but it should work.
If any bugs, please tell me.
__________________