No categories assigned
LUA:SetHP
- Last edited 12 years ago by I need to Update My Profile
LUA Functions: SetHP()
Sets the given spawns HP to the given value
Syntax
SetHP(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (sint32)
- param1 is the spawn who's HP we want to set
- param2 is the value we want to set the HP to
Usage
function hailed(NPC, Spawn)
local hp = GetMaxHP(Spawn) * 0.5
SetHP(Spawn, hp)
end
When the NPC is hailed the players HP will be set to 50%