Quote:
Originally Posted by lexzor
PHP Code:
#include <amxmodx> #include <hamsandwich> #include <fun>
#define IsValid(%0) (0 < %0 < 33)
new g_cvar
public plugin_init() { register_plugin("Low HP", "alliedmods", "0.1")
RegisterHam(Ham_Spawn, "player", "fwPlayerSpawn", 1)
g_cvar = register_cvar("spawn_hp_amount", "25") }
public fwPlayerSpawn(id) { if(is_user_alive(id) && IsValid(id)) { set_user_health(id, get_pcvar_num(g_cvar)) } }
|
Thanks, it works fine even in DeathMatch, but the BOTs are not affected when they respawn, they keep respawning at 100% HP
__________________