Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

struct of car


dtd mods
 Share

Recommended Posts

 

hi every1 what is this? and how can i use this? give an example

CODE:

0A97: [email protected] = car [email protected] struct

It reads several infos of the player car. Needs to read memory adresses to get the infos.

I´m not able to do it. I can just give exembles:

 

Yelmi used it to read the Nitro state:

 

{$CLEO .cs}:Nitro_Display03A4: name_thread 'NITRO' :NITRO_110001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @NITRO_11 00D6: if and0038:   $ONMISSION == 0 00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @NITRO_11 :NITRO_680001: wait 0 ms00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @NITRO_68 077E: get_active_interior_to [email protected] 00D6: if and0038:   $ONMISSION == 00039:   [email protected] == 0 00DF:   actor $PLAYER_ACTOR driving 004D: jump_if_false @NITRO_88 03C0: [email protected] = actor $PLAYER_ACTOR car 096D: get_car [email protected] car_component 8 on_slot [email protected] 00D6: if 8039:   not  [email protected] == -1 004D: jump_if_false @NITRO_88 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @NITRO_88 0A97: [email protected] = car [email protected] struct 000A: [email protected] += 2424 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 03F0: enable_text_draw 1045A: text_draw_1number  250.0  40.0 'NUMBER' [email protected]    // value0002: jump @NITRO_68:NITRO_8801C3: remove_references_to_car [email protected]  // Like turning a car into any random car0002: jump @NITRO_11

 

 

Seemann used it for the carrec.cs which allows to record a carrec path

look at: http://cleo.sannybuilder.com/

More informations at http://www.gtaforums.com/index.php?showtopic=297295

and

http://www.gtaforums.com/index.php?showtopic=408404

 

Seemann posted a link to a tool made by Sanchez in the .RRR format explanation topic

but the link is dead.

I uploaded it at mediafire: R3D.rar

It shows the infos of the carstruct

Link to comment
Share on other sites

Well, first of all read something about how the addresses work in a process before making changes.

 

0A96: [email protected] = actor $ACTOR struct0A97: [email protected] = car $VEHICLE struct0A98: [email protected] = object $OBJECT struct

 

These opcodes reads the pointer of actors, cars and objects where some values can be found by adding another ones. These opcodes aren't really important if you want to get values from the player, because they can be replaced by using these lines (I didn't tested them but they will work surely, I think):

 

[email protected] = 0xB6F5F0 // [email protected] = 0xB6F980 // CPlayerVehicle//[email protected] = 0x???????? // there's no CPlayerObject

 

To have the value of an address you should read it, ofcourse, so use 0A8D to do it. This is an example to get the player's xyz coords.

 

Address + Offset taken from gtamodding.com in #Pedestrians0xB6F5F0 - Player pointer (CPlayer)+0x14 - Pointer to XYZ position structure  +0x30 = XPos +0x34 = YPos +0x38 = ZPos

 

Everytime you heard a pointer, you should read it's memory. So follow the code above:

 

0A96: [email protected] = actor $PLAYER_ACTOR [email protected] += 0x14 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // read pointer's memory of CPed XYZ position [email protected] += 0x30 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // x pos [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // y pos [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // z pos 

 

Using the CPed pointer I added 0x14 to get the player pos structure and then I added again 0x30, 0x34, 0x38 to get respectively the xyz player coords.

 

Note: I added for the next coords 0x4 so I didn't have to reread the player pointer and add 0x14.

 

You can get the same effects as the opcode 0A96 by doing this (a bit longer and unused):

 

0A8D: [email protected] = read_memory 0xB6F5F0 size 4 virtual_protect 0 // read pointer's memory of CPlayer structure

 

You have to know with these addresses you can do whatever you want if you know where your data is certainly stored (you should try to search all addresses in the exe by yourself, I use cheat engine to find some).

 

You should read something on gtamodding.com memory addresses section for gta sa. It can be found here.

Edited by Wesser

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

Well, first of all read something about how the addresses work in a process before making changes.

 

0A96: [email protected] = actor $ACTOR struct0A97: [email protected] = car $VEHICLE struct0A98: [email protected] = object $OBJECT struct

 

These opcodes reads the pointer of actors, cars and objects where some values can be found by adding another ones. These opcodes aren't really important because they can be replaced by using these lines (I didn't tested them but they will work surely, I think).

 

[email protected] = 0xB7CD98 // [email protected] = 0xB7D324 // [email protected] = 0x?????? // I don't remember

 

 

Using absolute addresses as you suggest, you are only able to get information on some specific Items, such as the player actor and the current car of the player actor.

 

The 0A96, 0A97 and 0A98 opcodes are very important, as they provide access to the memory structure for ANY actor, ANY car and ANY OBJECT.

These opcodes are especially crucial if you want to access or modify a property of an actor, car or object, for which no SCM opcodes exist.

bS8xA.png
Link to comment
Share on other sites

Yep, you are right, I was wrong. I know I posted the player and vehicle pointer so you can only get values from player or the current car used by him.

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

No problem, your examples for accessing properties through a pointer (either obtained through one of the opcodes or as an absolute address) are very useful nevertheless.

 

BTW, the offsets at which certain properties can be found in these memory structures, as well as other useful memory addresses can be found here.

bS8xA.png
Link to comment
Share on other sites

 

Well, first of all read something about how the addresses work in a process before making changes.

 

0A96: [email protected] = actor $ACTOR struct0A97: [email protected] = car $VEHICLE struct0A98: [email protected] = object $OBJECT struct

 

These opcodes reads the pointer of actors, cars and objects where some values can be found by adding another ones. These opcodes aren't really important if you want to get values from the player, because they can be replaced by using these lines (I didn't tested them but they will work surely, I think).

 

[email protected] = 0xB7CD98 // [email protected] = 0xB7D324 // [email protected] = 0x?????? // I don't remember

 

To have the value of an address you should read it, ofcourse, so use 0A8D to do it. This is an example to get the player's xyz coords.

 

0A96: [email protected] = actor $PLAYER_ACTOR [email protected] += 0x14 [email protected] += 0x30 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // x pos [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // y pos [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // z pos 

 

Using the CPed pointer I added 0x14 to get the player pos structure and then I added again 0x30, 0x34, 0x38 to get respectively the xyz player coords.

 

Note: I added for the next coords 0x4 so I didn't have to reread the player pointer and add 0x14.

 

You can also make a different code which makes the same thing by seeing the following (more easier but unused).

 

[email protected] = 0xB7CDDC 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // x pos [email protected] = 0xB7CDE0 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // y pos [email protected] = 0xB7CDE4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // z pos 

 

You have to know with these addresses you can do whatever you want if you know where your data is certainly stored (you should try to search all addresses in the exe by yourself, I use cheat engine to find some).

 

You should read something on gtamodding.com memory addresses section for gta sa. It can be found here.

thx for the help but i dont understand how can i use them for example this 0xBAA420 - Wanted Level can you help? i mean throgn the memory address how can i put to the player a wanted level to 4

Edited by dtd mods
Link to comment
Share on other sites

Well, first of all read something about how the addresses work in a process before making changes.

 

0A96: [email protected] = actor $ACTOR struct0A97: [email protected] = car $VEHICLE struct0A98: [email protected] = object $OBJECT struct

 

These opcodes reads the pointer of actors, cars and objects where some values can be found by adding another ones. These opcodes aren't really important if you want to get values from the player, because they can be replaced by using these lines (I didn't tested them but they will work surely, I think).

 

[email protected] = 0xB7CD98 // [email protected] = 0xB7D324 // [email protected] = 0x?????? // I don't remember

 

To have the value of an address you should read it, ofcourse, so use 0A8D to do it. This is an example to get the player's xyz coords.

 

0A96: [email protected] = actor $PLAYER_ACTOR [email protected] += 0x14 [email protected] += 0x30 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // x pos [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // y pos [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // z pos 

 

Using the CPed pointer I added 0x14 to get the player pos structure and then I added again 0x30, 0x34, 0x38 to get respectively the xyz player coords.

 

Note: I added for the next coords 0x4 so I didn't have to reread the player pointer and add 0x14.

 

You can also make a different code which makes the same thing by seeing the following (more easier but unused).

 

[email protected] = 0xB7CDDC 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // x pos [email protected] = 0xB7CDE0 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // y pos [email protected] = 0xB7CDE4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // z pos 

 

You have to know with these addresses you can do whatever you want if you know where your data is certainly stored (you should try to search all addresses in the exe by yourself, I use cheat engine to find some).

 

You should read something on gtamodding.com memory addresses section for gta sa. It can be found here.

thx for the help but i dont understand how can i use them for example this 0xBAA420 - Wanted Level can you help?i mean how to add to the player a wanted level to 2 but with the memory address

Link to comment
Share on other sites

The post has been redirected here.

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.