function onD3DPresent()
for id=0, 4096 do
local PICKUP_HANDLE = sampGetPickupHandleBySampId(id)
if PICKUP_HANDLE ~= 0 then
local pickup = vector(getPickupCoordinates(PICKUP_HANDLE))
if isPointOnScreen(pickup.x, pickup.y, pickup.z, 1.0) then
local pickup_2d = vector(convert3DCoordsToScreen(pickup.x, pickup.y, pickup.z))
renderFontDrawText(font, string.format("P_ID: %d\nM_ID: %d", id, get_pickup_model(id)), pickup_2d.x, pickup_2d.y, 0xFF55FFFF, 0xFF000000)
end
end
end
end
function get_pickup_model(id)
return ffi.cast("int *", (id * 20 + 61444) + PICKUP_POOL)[0]
end