Types
EventHandle
Section titled “EventHandle”Returned by AddEventHandler and RegisterNetEvent.
| Field | Type | Description |
|---|---|---|
key |
integer |
Internal ID of the handler. |
name |
string |
Name of the event. |
vector2
Section titled “vector2”Read-only vector with 2 components. Supports + - * /, # (length) and swizzles like v.xy.
| Field | Type | Description |
|---|---|---|
x |
number |
x component. |
y |
number |
y component. |
vector3
Section titled “vector3”Read-only vector with 3 components. Supports + - * /, # (length) and swizzles like v.xy.
| Field | Type | Description |
|---|---|---|
x |
number |
x component. |
y |
number |
y component. |
z |
number |
z component. |
vector4
Section titled “vector4”Read-only vector with 4 components. Supports + - * /, # (length) and swizzles like v.xy.
| Field | Type | Description |
|---|---|---|
x |
number |
x component. |
y |
number |
y component. |
z |
number |
z component. |
w |
number |
w component. |
promise
Section titled “promise”Result that arrives later. Use p:resolve(…), p:reject(err), p:next(onResolved, onRejected) and Citizen.Await(p).
| Field | Type | Description |
|---|---|---|
resolve |
fun(self: promise, ...: any) |
Fulfil the promise with values. |
reject |
fun(self: promise, err: any) |
Fail the promise. |
next |
fun(self: promise, onResolved?: function, onRejected?: function): promise |
Run a function when it is done. |