Skip to main content

PedGetHealth

Description​

function PedGetHealth(id) --[[ ... ]] end

Parameters​

  • id: integer - The ped's model ID.

Return Values​

  • Health: integer - The ped's health value.

Example​

Print how much health the target ped has.

local ped = PedGetTargetPed(gPlayer)

if PedIsValid(ped) then
TextPrintString(PedGetName(ped)..": "..PedGetHealth(ped).." hp", 3, 2)
end

See Also​