Wiki
Clone wikiEFLC-MP LUA / onPlayerHpChange
Description
This function is triggered when the player HP changes
Parameters
Int playerId, Int lastDamageType, Int lastDamageGiver, Int boneId
Int lastDamageType: 0: was a player, 1: was a vehicle, -1: unknown
Int lastDamageGiver: ID of the player or vehicle
Int boneId: which bone was damaged. (Added on build 11.2)
Return values
Example
#!lua function onPlayerHpChange(playerid, agentType, agentId, boneId) end registerEvent("onPlayerHpChange", "onPlayerHpChange")
Updated