Skip to content

Natives

Functions

Return Type Name Description
native_return invoker.call(number hash, ...args) Invokes a native
ptr_bool ptr_bool(number? count) Creates a pointer to be used with native calls
ptr_int ptr_int(number? count) Creates a pointer to be used with native calls
ptr_float ptr_float(number? count) Creates a pointer to be used with native calls
ptr_scr_array ptr_scr_array(number count) Creates a pointer to be used with native calls

Types

native_return

Property Name Description
number int The value as this type
number int64 The value as this type
number float The value as this type
bool bool The value as this type
string str String
memory_address address Memory address
scr_vec3 vec3 List of three floats

ptr_int

Property Name
number value
Return Type Name Description
nil from_address(memory_address address) Sets the data from a memory_address
memory_address address() The value as a memory_address
nil free() Deletes the memory allocated

ptr_float

Property Name
number value
Return Type Name Description
nil from_address(memory_address address) Sets the data from a memory_address
memory_address address() The value as a memory_address
nil free() Deletes the memory allocated

ptr_bool

Property Name
bool value
Return Type Name Description
nil from_address(memory_address address) Sets the data from a memory_address
memory_address address() The value as a memory_address
nil free() Deletes the memory allocated

ptr_scr_array

Can be used with [] operator.

Return Type Name Description
memory_address address() The value as a memory_address
nil free() Deletes the memory allocated

Examples

-- Using int pointer
local character = ptr_int()
invoker.call(0x767FBC2AC802EF3D, joaat('MPPLY_LAST_MP_CHAR'), character)
print(character.value)
character:free()