OnPedInflictDamage: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 11: Line 11:
|parameter5 = int pedPiece The ped piece ID for the damage.
|parameter5 = int pedPiece The ped piece ID for the damage.
|cancellable = true
|cancellable = true
|exampleJSCS = addEventHandler('onPedInflictDamage', function(event, ped, responsibleEntity, weapon, loss, pedPiece)
{
// Prevent the ped from being damaged.
event.preventDefault();
});
}}
}}

Revision as of 00:58, 22 April 2021

onPedInflictDamage

Signature: void onPedInflictDamage()

Usage: a ped is damaged

Parameters

Ped ped The ped that has been damaged.
Entity responsibleEntity The entity that is responsible for the damage.
int weapon The weapon ID for the damage.
float loss The ped health lost for the damage.
int pedPiece The ped piece ID for the damage.

Return

void