I can't get that to work.
PHP Code:
public hook_damage(id, inflictor_id, attacker_id, Float:damage, damagebits)
{
// Katana and up, according to tsconst.inc
if (inflictor_id >= 34)
nrp_setuserstamina(id, nrp_getuserstamina(id) - (floatround(damage, floatround_round) / 10))
else
{
// Ignore worldspawn
if (inflictor_id == 0)
{
}
else
client_print(id, print_chat, "[NRP] Weapons are not allowed!")
set_user_health(id, get_user_health(id) + floatround(damage, floatround_round))
}
return HAM_HANDLED
}