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

hooking model name with write_memory


Silent
 Share

Recommended Posts

Hi, I'm trying to hook the car model without using the other car ID. For that I'm going to hook Model name and Txd name ingame. But I don't know in which mem addresses that informations are stored (if it's stored at all). Maybe anyone know how to do this?

 

I'm going to do thing like this:

 

 

// This file was decompiled using sascm.ini published by GTAG (http://gtag.gtagaming.com/opcode-database.php) on 6.2.2010{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------0000: NOP // Without any mods ID 400 = Landstalker. 0A8C: write_memory REQUESTED_MEM_ADDRESS size ?? value ?? virtual_protect ?? Model.Load(400) // By vehicles.ide hook, ID 400 is now hooked model, not Landstalker.:NONAME_20wait 10 if   Model.Available(400)else_jump @NONAME_20 [email protected] = Car.Create(400, 0.0, 0.0, 0.0) // Car with hooked model spawns.0A93: end_custom_thread

 

 

I know I can just create new car with requested model, but this thing is needed for SA-MP.

 

Link to comment
Share on other sites

Hmm... people insist on finding magical memory addresses for these things?

 

I don't really know what you're asking, but it might help you to know that model/txd names are not used in code. They are turned into model numbers:

 

 

#LANDSTAL -> 400

 

 

The .txd and .dff files would be landstal.dff and landstal.txd

 

There is no such thing as a car id (from what I know). A car model number is used to load the vehicle, not an id.

 

 

If you could explain what you want to happen, when you do _____ in game, that'd probably help me understand what you're asking. I doubt there's an address that has some sort of text-to-model number conversion. Maybe there is, but I trust it would be very hard to find. Plus, it would probably a function address, not a memory address wink.gif

Link to comment
Share on other sites

NTAuthority

It appears you're trying to use this to cheat SA-MP, and I don't think that's allowed in here. They protect default.dat/vehicles.ide for a good reason. wink.gif If you want to change the spawned vehicle, do so in the server's gamemode code.

SsZgxdL.png

Inactive in GTA/R* title modification indefinitely pursuant to a court order obtained by TTWO. Good job acting against modding!

Link to comment
Share on other sites

I don't want to cheat SA-MP in illegal way - I'm going to replace only car model to unique one, for Role Play server. Without editing handling or something other.

Link to comment
Share on other sites

Well that counts as cheating. Different model = different physics on the car.. Which can mean more of an advantage for you.

 

If you really need to switch models, do it via the gta3.img.. Rename the two cars you wanna switch to each others names. Doing this with code would result in crashes 99.9% of the time tounge.gif

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 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.