cancellableEvent.preventDefault: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = preventDefault
|side = shared
|type = method
|type = method
|class = Event
|class = CancellableEvent
|name = preventDefault
|games = iii vc sa iv
|parameters = void
|desc = prevent the default action for the current event which is triggering
|return1 = void
|return = void
|returnFail1 = void
|freturn = void
|usage = prevent the default action for the current event which is triggering
|note = 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();
});
}}
}}
6,834

edits

Navigation menu