CLEO Help PedSlotsUsed help

CLEO related
Status
Not open for further replies.

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
Is there a way to read the PedSlotsUsed in a Cleo and eventually store it in a variable?
It shows up when you press F5.
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Iterate thru Ped structure and check whenever the first int\dword in the each block is more than 0, then ++ your variable and you're done

0xB7CD98 - Player pointer, direct offset to the ped pool start (CPed)
0xB74498 - CPeds maximum number (normally 140)
0xB74490 - Contains a pointer to a main struct below
CPed block size = 0x7C4 bytes.
Src : https://www.gtamodding.com/wiki/Memory_Addresses_(SA)#Pedestrians
 

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
supahdupahnubah said:
Iterate thru Ped structure and check whenever the first int\dword in the each block is more than 0, then ++ your variable and you're done

0xB7CD98 - Player pointer, direct offset to the ped pool start (CPed)
0xB74498 - CPeds maximum number (normally 140)
0xB74490 - Contains a pointer to a main struct below
CPed block size = 0x7C4 bytes.
Src : https://www.gtamodding.com/wiki/Memory_Addresses_(SA)#Pedestrians
Thanks. :)
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
supahdupahnubah said:
Guess this is the most easiest way to just get a variable in case you wont work with peds

Kinda, if you need it for a quick something, will break in next sa-mp versions so loopin' through peds is more 'future proof'.
 
Status
Not open for further replies.
Top