Skip to content

Pools

Functions

Return Type Name Description
table<number, memory_address>[] pools.ped() Returns a list of peds as (handle, address)
table<number, memory_address>[] pools.object() Returns a list of objects as (handle, address)
table<number, memory_address>[] pools.pickup() Returns a list of pickups as (handle, address)
table<number, memory_address>[] pools.vehicle() Returns a list of vehicles as (handle, address)
table<memory_address>[] pools.weapon() Returns a list of weapons as memory_address

Examples

-- Loop through peds in the pool and print their guid (handle used in natives)
for index, value in ipairs(pools.ped()) do
  local num, addr = value[1], value[2]
  print('Ped guid:', num)
end

-- Loop through weapons (CWeaponInfo) and print the name hash
for index, value in ipairs(pools.weapon()) do
  local name_hash = value:add(0x10).uint32
  print('Weapon hash:', name_hash)
end