6,834
edits
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
|usage = prevent the default action for the current event which is triggering | |usage = prevent the default action for the current event which is triggering | ||
|notes = See also: [[event.isDefaultPrevented|event.isDefaultPrevented]] | |notes = See also: [[event.isDefaultPrevented|event.isDefaultPrevented]] | ||
|exampleJSCS = addEventHandler('onPedInflictDamage', function(event, ped, responsibleEntity, weapon, loss, pedPiece) | |||
{ | |||
// Prevent the ped from being damaged. | |||
event.preventDefault(); | |||
}); | |||
}} | }} |
edits