Yeah but if you have 5 pickups of the same model next to each other which one does the script pick? Most likely will get the first one inside the pickup pool which might not be the pickup you're looking for.
server renders 6 pickups per map I believe, so having multiple in render shouldn't really be important. But just in case, I wrote this, I'm gonna test it out in a sec
0BB9: samp 1@ = get_pickup_pool_ptr
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0 // PickupsCount
if 2@ > 0
then
0A8E: 2@ = 1@ + 0x4 // ul_GTA_PickupID
0A8E: 3@ = 1@ + 0xF004 // stPickup
for 4@ = 0 to 4095 step 1
0A90: 5@ = 4@ * 4
005A: 5@ += 2@
0A8D: 5@ = read_memory 5@ size 4 virtual_protect 0
if 5@ <> 0
then
0A90: 5@ = 4@ * 20
005A: 5@ += 3@
0A8D: 5@ = read_memory 5@ size 4 virtual_protect 0 // pickupModel
if 003b: 5@ == <mypickupmodelid>
// do something like drawing or output in chat as debug for start
end
end
end
end