bindKey

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 bindKey(int keyCode, int keyState, function callback)

Description

The bindKey function is used to bind a handler to be called when a specific key is pressed or released.

Parameters

Type Name Presence Default Value Description
int keyCode required n/a The key code to bind the event for.
int keyState required n/a The key state to bind the event for.
function callback required n/a The scripting fucntion to call when the event occurs.

Returns

Success Returns

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

Failure Returns

Type Value
void n/a

Callbacks

Server:
function(KeyEvent event, Client client)
Client:
function(KeyEvent event)

Notes

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.

Related

Server Related

bindKey
unbindAllKeys
unbindKey


Client Related

bindKey
isKeyDown
isScancodePressed
unbindAllKeys
unbindKey