cancellableEvent.preventDefault
Method
Server and Client
Online and Offline
void cancellableEvent.preventDefault(void)
Parameters
void | This method doesn't take any parameters. |
Return
void | This method doesn't return a value. |
Types
Shared
CancellableEvent
Notes
- See also: event.isDefaultPrevented.
Examples
Example 1 - JavaScript - Client-Side:
addEventHandler('onPedInflictDamage', function(event, ped, responsibleEntity, weapon, loss, pedPiece)
{
// Prevent the ped from being damaged.
event.preventDefault();
});
Compatibility
There isn't any compatibility information for this method.
Related
Server Related
addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
triggerNetworkEvent
unbindEventHandler
Client Related
addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
triggerNetworkEvent
unbindEventHandler