Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      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

Explanation needed


Swoorup
 Share

Recommended Posts

What does each of these opcodes do?

 

05E6: [email protected] = actor [email protected] struct

 

05E7: [email protected] = car [email protected] struct

 

05E8: [email protected] = object [email protected] struct

 

05E9: [email protected] = ped_struct [email protected] handle

 

05EB: [email protected] = vehicle_struct %1d% handle

 

05EA: [email protected] = vehicle_struct [email protected] handle

 

I think all contains the address that points to the structure an entity. But what is the difference between 0x5E7 and 0x5EB and 0x5EA

Link to comment
Share on other sites

05E6, 05E7 and 05E8 get the class pointer to the entity from the handle.

05E9, 05EA and 05EB get the handle of the entity from the class pointer.

Link to comment
Share on other sites

It seems a bit of confusing for me actually. Deji can you tell me which one would point to a vehicle block directly from a variable (the one which I would use to create a vehicle)?

 

EDIT: And what is an entity? Is it an instance of anything used in SCM?

Link to comment
Share on other sites

009A: [email protected] = create_actor_pedtype 4 model #MALE01 at 0.0 0.0 0.0 // We created a actor05E6: [email protected] = actor [email protected] struct          // Get the pointer to actor struct based in its handle ([email protected])... ops we overwrite its handle! OMG!05E9: [email protected] = ped_struct [email protected] handle     // We get the actor handle based in its struct... We have the handle back 

 

Link to comment
Share on other sites

First of all by struct it`s meant to be memory address

It`s address (or pointer) of structure .g CPed.

Example of function using CVehicle struct:

 

:GetVehicleDoorState{Description:   Gets current door state of vehicle handle.     1 - open     2 - closedParameters:  Passed:    [email protected] - vehicle handle     Result:     [email protected]   Returns true or false.Example: 0AB1: call_scm_func @GetVehicleDoorState 1 car_handle [email protected] store_state_to [email protected]  }0A97: [email protected] = car [email protected] struct  [email protected] += 1272  // This is memory adress. Car struct (specified car) + 1272  is adress of door state. 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect false0AB2: ret 1 [email protected]

 

Value on address [car struct + 1272] is a door state.

When you have memory address you can read value of some part of structure.

Edited by fastman92
Link to comment
Share on other sites

What you just did is played handle contained [email protected] as if it was a football? Correct me if I am wrong though tounge.gif

 

TQ!

My example was so bad? suicidal.gif

Link to comment
Share on other sites

Exactly fastman

That was what in my mind earlier.

 

So it means I can alter or read any of these value from vehicle struct

 

0x7E49C0 - [pointer] - Player's car pointer (player pointer when not in car)

+0x04 - [float] - X roll

+0x08 - [float] - Y roll

+0x0C - [float] - Z roll

+0x14 - [float] - X direction

+0x18 - [float] - Y direction

+0x1C - [float] - Z direction

+0x24 - [float] - Last X position

+0x28 - [float] - Last Y position

+0x2C - [float] - Last Z position

+0x34 - [float] - x coordinate

+0x38 - [float] - y coordinate

+0x3C - [float] - z coordinate

+0x5C - [4 bytes] - IDE model

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.