Skip to content

Invoker

Reference for the invoker API.

Functions

invoker.call

Invoke a native.

lua
---@param hash integer
---@param args? ...
function invoker.call(hash, args?): native_invoke

Types

native_invoke

FieldType
intinteger
int64integer
floatnumber
boolbool
strstring
addressmemory_address
scr_vec3scr_vec3
paramsscr_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)