Vehicle Addresses

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Hey, i have been trying for a while to find addresses for player Driving_Flying_Vehicle (possibly a bool or an int?) and an address for the current vehicle modelId (as in vehicles.ide). I have been able to find the modelId address for cars but it doesn't seem to work on planes which is what i need. I have searched and used the SA Memory Addresses page that 0x688 linked http://www.gtamodding.com/?title=Memory_Addresses_(SA) but the pointers aren't leading to what they should. can anyone help with these 2 addresses?


--EDIT: possibly have found Player_Driving_Flying_Vehicle. just need the model id of the current plane, thanks
 

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
Current vehicle model ID: gta_sa.exe+7700F0
(Still searching solution for rest addresses)

I think plane model id will be somewhere in vehicle struct...
 

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Thanks!. I found 0x7700F0 earlier, its the address that only works for cars and not for planes. I havent been able to use the vehicles struct since the addresses on the SAMP wiki don't seem to work for me.
 

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
mrT101 link said:
Thanks!. I found 0x7700F0 earlier, its the address that only works for cars and not for planes. I havent been able to use the vehicles struct since the addresses on the SAMP wiki don't seem to work for me.

I found address to plane model ID: vehicle struct+34 (2 bytes)

Driving_Flying_Vehicle: gta_sa.exe+690495 (1 byte: 0 - normal vehicle, 1 - plane or helicopter)
 

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Thanks  m1zg4rd!, for the plane model ID, I'm trying:
Code:
0xB6F980 (direct pointer to the pool start (CVehicle))
+
0x34
This should be the vehicle id ? I get either 0 or different numbers to the id when i search this address as 2 bytes. Thanks for the help!
 

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
mrT101 link said:
Thanks  m1zg4rd!, for the plane model ID, I'm trying:
Code:
0xB6F980 (direct pointer to the pool start (CVehicle))
+
0x34
This should be the vehicle id ? I get either 0 or different numbers to the id when i search this address as 2 bytes. Thanks for the help!

Decimal 34 :)
 

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
I'm still trying to get this working but it won't. can you see anything wrong with the code?
Code:
DWORD address = *(DWORD*)(0xB6F980); 
address = *(DWORD*)(address + 34);
int* value = (int*) address;
printf("%i", value);
 

T3KTONIT

Well-known member
Joined
Sep 2, 2013
Messages
308
Reaction score
5
mrT101 link said:
I'm still trying to get this working but it won't. can you see anything wrong with the code?
Code:
DWORD address = *(DWORD*)(0xB6F980); 
address = *(DWORD*)(address + 34);
int* value = (int*) address;
printf("%i", value);

Correction :

PHP:
DWORD address = *(DWORD*)(0xB6F980); 
unsigned short value = *(unsigned short*)(address + 34);
printf("%d", value);
 

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Thanks T3K!, however this is still crashing me. I have no idea why this is happening :/ it is the correct offset seen everywhere.
 

T3KTONIT

Well-known member
Joined
Sep 2, 2013
Messages
308
Reaction score
5
mrT101 link said:
Thanks T3K!, however this is still crashing me. I have no idea why this is happening :/ it is the correct offset seen everywhere.
i Edited my post since he mentioned that the datatype of the model id is a 2 byte, in this case it's an unsigned short (uint16)
 
Top