CLEO Help struct

CLEO related
Status
Not open for further replies.

forev

New member
Joined
May 23, 2018
Messages
3
Reaction score
0
i have this snippet

Code:
:SendUnOccupiedVehicleSync
7@ = SAMP.GetSAMPVehicleIDByCarHandle(0@)
Car.PutAt(0@, 1@, 2@, 3@)
alloc 4@ 67 
0C0D: struct 4@ offset 0 size 2 = 7@ /////??????
0C0D: struct 4@ offset 2 size 1 = 1 /////??????
0C0D: struct 4@ offset 3 size 4 = -1.0 /////??????
0C0D: struct 4@ offset 7 size 4 = -0.01 /////??????
0C0D: struct 4@ offset 11 size 4 = 0.05 /////??????
0C0D: struct 4@ offset 15 size 4 = 0.09 /////??????
0C0D: struct 4@ offset 19 size 4 = -1.0 /////??????
0C0D: struct 4@ offset 23 size 4 = 0.02 /////??????
0C0D: struct 4@ offset 27 size 4 = 1@ /////x position
0C0D: struct 4@ offset 31 size 4 = 2@ /////y position
0C0D: struct 4@ offset 35 size 4 = 3@ /////z position
0C0D: struct 4@ offset 39 size 4 = 0.0 /////??????
0C0D: struct 4@ offset 43 size 4 = 0.0 /////??????
0C0D: struct 4@ offset 47 size 4 = 400.0 /////??????
0C0D: struct 4@ offset 51 size 4 = 0.0 /////??????
0C0D: struct 4@ offset 55 size 4 = 0.0 /////??????
0C0D: struct 4@ offset 59 size 4 = 0.0 /////??????
0C0D: struct 4@ offset 63 size 4 = 1000.0 // i guess this is health 
5@ = RakNet.NewBitStream()
BitStream.Write(5@, 209, BS_TYPE_BYTE, 1)
BitStream.Write(5@, 4@, BS_TYPE_ARRAY, 67)
RakNet.LiteSend(5@)
RakNet.DeleteBitStream(5@)
free 4@ 
ret 0

i want to learn, how can i find defines of these offsets?
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Reaction score
154
idk where is this from and if it's accurate but check this out:
https://pastebin.com/0kfBm9tw


PACKET_UNOCCUPIED_SYNC = 209
//struct stUnoccupiedData ( size = 67 )
//int16_t sVehicleID; +0
//uint8_t byteSeatID; +2
//float fRoll[3]; +3
//float fDirection[3]; +15
//float fPosition[3]; +27
//float fMoveSpeed[3]; +39
//float fTurnSpeed[3]; +51
//float fHealth; +63
 

forev

New member
Joined
May 23, 2018
Messages
3
Reaction score
0
monday said:
idk where is this from and if it's accurate but check this out:
https://pastebin.com/0kfBm9tw


PACKET_UNOCCUPIED_SYNC = 209
//struct stUnoccupiedData ( size = 67 )
//int16_t sVehicleID; +0
//uint8_t byteSeatID; +2
//float fRoll[3]; +3
//float fDirection[3]; +15
//float fPosition[3]; +27
//float fMoveSpeed[3]; +39
//float fTurnSpeed[3]; +51
//float fHealth; +63

you just saved my life, thank you.  :)

(is there a version with including [3] ones? ex; fmovespeedx fmovespeedy fmovespeedz?)
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Reaction score
154
forev said:
(is there a version with including [3] ones? ex; fmovespeedx fmovespeedy fmovespeedz?)
I'm not sure what you mean to be honest, you could just rewrite it

instead of:
float fMoveSpeed[3];

you'd have:
float fMoveSpeed_x;
float fMoveSpeed_y;
float fMoveSpeed_z;

it creates the same variables and stands for the same data type within struct. Using [3] just makes it more concise to write and easier to access in c++
 
Status
Not open for further replies.
Top