bindEventHandler

From GTA Connected
Jump to navigation Jump to search

Function Server and Client All Games Online and Offline

Server 1.0.0, Client 1.0.0

void bindEventHandler(string eventName, handle source, function handler)

Description

The bindEventHandler function is used to add a handler to call when an event occurs for the source item.

Parameters

Type Name Presence Default Value Description
string
eventName
required n/a The name of the event, case-insensitive.
handle
source
required n/a The source element.
function
handler
required n/a The scripting function to call when the event occurs for the source element.

Returns

Success Returns

Type Description
void
This function doesn't return any values on success.

Failure Returns

Type Value
void
n/a

Callbacks

function handler(Event event, [...])
Type Name Description
Event
event
The event object.
...
vararg
The arguments specific to the eventName.

Notes

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.

Related

Server Related

addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
unbindEventHandler

event.isDefaultPrevented
event.preventDefault


Client Related

addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
unbindEventHandler

event.isDefaultPrevented
event.preventDefault