worldGetAllVehicles worldGetAllPeds

// dummy pool functions (need implementation)

int DLL_EXPORT worldGetAllVehicles(int* array, int arraySize)
int DLL_EXPORT worldGetAllPeds(int* array, int arraySize)

Would be a huge help to have these. Thanks!

And yes it is possible to do yourself. But it’s just annoying/messy. Just go 72 ray tests on the client 5 degree movement, every 500ms (72 * 5, 360degrees, cool huh?).

for i = 1, 72 do     

local angle = math.rad(i * 5)

local startX = (50.0 * math.cos(angle)) + playerCoords.x;
local startY = (50.0 * math.sin(angle)) + playerCoords.y;
                
local endX = playerCoords.x - (startX - playerCoords.x)
local endY = playerCoords.y - (startY - playerCoords.y)

local rayHandle = StartShapeTestCapsule(startX, startY, playerCoords.z, endX, endY, playerCoords.z, 10.0, 12, playerPed, 1000)

That’s like a 100 unit, 10 radius tube of discovery. If it finds a ped, I start it again swapping the start/end. You won’t miss a ped with this bad boy. Then I store the new peds in a database and parse/update/delete as needed. But it’s still annoying. Like to blacklist models, the blacklisted model has to be created, then found, then modified. Removing all weapons, peds have to be found with a ray test, then modified. Somewhere there has to be a register new ped sent to the server, the server has to know since when you walk into an area, the server tells you what is already spawned/there (not the client who spawned it).

After talk with an element, he said that we can’t have access to Native::MemoryAccess::GetVehicleHandles(position, radius);.
I’ll be awesome to have access to this memory but not for now visibly :confused:

your code seems incomplete, can you correct it please, thanks! :blush: