{"hash":"0x2B9D4F50","ns":"CFX","name":"GET_GAME_POOL","slug":"GET_GAME_POOL","official":true,"named":true,"luaName":"GetGamePool","game":"cfx","apiset":"shared","returnType":"object","params":[{"name":"poolName","type":"char*","description":"The pool name to get a list of entities from."}],"returnsDescription":"An array containing entity handles for each entity in the named pool.","summary":"Returns a list of entity handles (script GUID) for all entities in the specified pool - the data returned is an array as Supported pools","descriptions":[{"source":"cfx","format":"md","body":"Returns a list of entity handles (script GUID) for all entities in the specified pool - the data returned is an array as\nfollows:\n\n```json\n[ 770, 1026, 1282, 1538, 1794, 2050, 2306, 2562, 2818, 3074, 3330, 3586, 3842, 4098, 4354, 4610, ...]\n```\n\n### Supported pools\n\n*   `CPed`: Peds (including animals) and players.\n*   `CObject`: Objects (props), doors, and projectiles.\n*   `CNetObject`: Networked objects\n*   `CVehicle`: Vehicles.\n*   `CPickup`: Pickups."}],"examples":[{"lang":"lua","code":"local vehiclePool = GetGamePool('CVehicle') -- Get the list of vehicles (entities) from the pool\nfor i = 1, #vehiclePool do -- loop through each vehicle (entity)\n    if GetPedInVehicleSeat(vehiclePool[i], -1) == 0 then\n        DeleteEntity(vehiclePool[i]) -- Delete vehicles (entities) that don't have a driver\n    end\nend","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/GET_GAME_POOL","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/GET_GAME_POOL.md","snippets":{"lua":"local retval = GetGamePool(poolName)","luaInvoke":"local retval = Citizen.InvokeNative(0x2b9d4f50, poolName, Citizen.ResultAsObject2(msgpack.unpack))","js":"const retval = GetGamePool(poolName);","jsInvoke":"const retval = Citizen.invokeNative('0x2b9d4f50', poolName, Citizen.returnResultAnyway(), Citizen.resultAsObject2());","csharp":"Function.Call((Hash)0x2b9d4f50, poolName);","notes":[]}}