6,833
edits
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{ScriptItem2 | ||
| | |name = onPedInflictDamage | ||
|side = client | |||
|type = event | |type = event | ||
| | |games = iii vc sa | ||
| | |desc = a ped is damaged | ||
| | |arg1 = Ped ped The ped that has been damaged. | ||
|arg2 = Entity responsibleEntity The entity that is responsible for the damage. | |||
| | |arg3 = int weapon The weapon ID for the damage. | ||
| | |arg4 = float loss The ped health lost for the damage. | ||
| | |arg5 = int pedPiece The ped piece ID for the damage. | ||
| | |cancel = true | ||
| | |exampleJSCS = addEventHandler('onPedInflictDamage', function(event, ped, responsibleEntity, weapon, loss, pedPiece) | ||
{ | |||
// Prevent the ped from being damaged. | |||
event.preventDefault(); | |||
}); | |||
}} | }} |
edits