Find a certain pickup

Status
Not open for further replies.
OP
OP
K

Kelsi235

Well-Known Member
Joined
Jun 2, 2019
Messages
53
Likes
4
Points
8
#2
http://ugbase.eu/index.php?threads/release-pickup-finder.12473/

I found this but if someone could explain to me how exactly functions work in cleo?

:getPickupIdByModel
0BB9: samp [email protected] = get_pickup_pool_ptr
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // PickupsCount
if [email protected] > 0
then
0A8E: [email protected] = [email protected] + 0x4 // ul_GTA_PickupID
0A8E: [email protected] = [email protected] + 0xF004 // stPickup
for [email protected] = 0 to 4095 step 1
0A90: [email protected] = [email protected] * 4
005A: [email protected] += [email protected]
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
if [email protected] <> 0
then
0A90: [email protected] = [email protected] * 20
005A: [email protected] += [email protected]
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // pickupModel
if 003b: [email protected] == [email protected]
then
0485: return_true
0AB2: ret 1 [email protected]
end
end
end
end
059A: return_false
0AB2: ret 1 -1



what does this function return? and how do I call it?
 
OP
OP
K

Kelsi235

Well-Known Member
Joined
Jun 2, 2019
Messages
53
Likes
4
Points
8
#7
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 [email protected] = get_pickup_pool_ptr
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // PickupsCount
if [email protected] > 0
then
0A8E: [email protected] = [email protected] + 0x4 // ul_GTA_PickupID
0A8E: [email protected] = [email protected] + 0xF004 // stPickup
for [email protected] = 0 to 4095 step 1
0A90: [email protected] = [email protected] * 4
005A: [email protected] += [email protected]
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
if [email protected] <> 0
then
0A90: [email protected] = [email protected] * 20
005A: [email protected] += [email protected]
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // pickupModel
if 003b: [email protected] == <mypickupmodelid>
// do something like drawing or output in chat as debug for start
end
end
end
end
 
Status
Not open for further replies.
Top