Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
dtd mods

struct of car

Recommended Posts

ZAZ

 

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

Share this post


Link to post
Share on other sites
Wesser

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

Share this post


Link to post
Share on other sites
PatrickW
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.

Share this post


Link to post
Share on other sites
Wesser

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.

Share this post


Link to post
Share on other sites
PatrickW

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.

Share this post


Link to post
Share on other sites
dtd mods

 

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

Share this post


Link to post
Share on other sites
dtd mods
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

Share this post


Link to post
Share on other sites
Wesser

The post has been redirected here.

Share this post


Link to post
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
Sign in to follow this  

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

×

Important Information

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