Appearance
Invoker
Reference for the invoker API.
Functions
invoker.call
Invoke a native.
lua
---@param hash integer
---@param args? ...
function invoker.call(hash, args?): native_invokeTypes
native_invoke
| Field | Type |
|---|---|
int | integer |
int64 | integer |
float | number |
bool | bool |
str | string |
address | memory_address |
scr_vec3 | scr_vec3 |
params | scr_value |
Examples
lua
local ptr = pointer_scr_vec3()
util.create_thread(function()
local ped = invoker.call(0xD80958FC74E988A6).int -- PLAYER_PED_ID
local coords = invoker.call(0x3FEF770D40960D5A, ped, false).scr_vec3 -- GET_ENTITY_COORDS
invoker.call(0xF2A1B2771A01DBD4, coords.x, coords.y, coords.z, 0, 255.0, 0, 1000.0, 1.0) -- DRAW_LIGHT_WITH_RANGE
if native.get_ped_last_weapon_impact_coord(ped, ptr) then
print(tostring(ptr.value.x) .. ', ' .. tostring(ptr.value.y) .. ', ' .. tostring(ptr.value.z))
end
end)