GetNPCHealth
From Onset Developer Wiki
Description
Returns NPC's health by its ID
Syntax
GetNPCHealth(npc)
Parameters
- npc
NPC you want to get health of
Return Value
- NPC Health
Example
function checkHealth(player, npc)
if IsValidNPC(tonumber(npc) then
AddPlayerChat(player, 'NPC has: ' .. GetNPCHealth(tonumber(npc)) .. ' health')
else
AddPlayerChat(player, 'This NPC doesn\'t exist!')
end
end
AddCommand('npchealth', checkHealth)
See also
__EDIT_ME__