Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
new const map[] = "35hp_2";
new mapname[32];
public plugin_init(){
get_mapname(mapname, charsmax(mapname));
if (equal(mapname, map) != -1){
RegisterHam(Ham_Spawn, "player", "Spawn", 1);
}
}
public client_disconnected(id){
if (task_exists(id)){
remove_task(id);
}
}
public Spawn(id){
set_task(1.5, "reset_health", id);
}
public reset_health(id){
if (is_user_alive(id)){
set_user_health(id, 100);
}
}
__________________