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. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    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 IV 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 SA Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA III 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

JernejL

Documenting GTA-SA memory addresses

Recommended Posts

DexX

most likely the address listed is for the cracked sa 1.00 exe, which was set as the "standard" at the begining of the topic, as it was the only one that can be successfully disassembled.

Share this post


Link to post
Share on other sites
QJimbo

Well that address works fine in v1.00 just not in the Non-hotcoffee v1.01 version. I was wondering if anyone knew the location of this value in this version dontgetit.gif

Edited by QJimbo

Share this post


Link to post
Share on other sites
QJimbo

Don't worry! I got Strechnutter to kindly help me smile.gif

 

Current Weather:

v1: $C8131C

v1.01: $C83ADC (the above plus $27C0)

 

Freeze Weather:

v1: $C81318

v1.01: $C83AD8 (again the above plus $27C0)

I actually nabbed the v1 address of this out of the GTA Control Center source. To use it you write your weather value as 2 bytes (00##) and to unlock the weather you write $FFFF to the space. The have the v1.01 address wrong in their source code as they add $2680 to it incorrectly.

 

The freeze weather system allowed me to not disable the weather code in GTA:SA for TimeSync Tool which is pretty cool biggrin.gif

 

Oh and may aswell give these:

Current Hour:

v1: $B70153

v1.01: $B727D3 (above plus $2680)

 

Current Minute:

v1: $B70152

v1.01: $B727D2 (above plus $2680)

Edited by QJimbo

Share this post


Link to post
Share on other sites
AleX AciD

Some addresses from me (OllyDbg, EU Hoodlum v1.0) sigh.gif

 

CRC calculation function for string names (id's) in gxt file:

0x0053CF30

I think it's

 

DWORD Calculate_Crc(char* string)

 

(not tested)

 

And table of DWORDs it uses (size: 256*4 bytes):

0x008CD068

 

008CD068     00000000    77073096    EE0E612C    990951BA008CD078     076DC419    706AF48F    E963A535    9E6495A3...008CD448     B3667A2E    C4614AB8    5D681B02    2A6F2B94008CD458     B40BBE37    C30C8EA1    5A05DF1B    2D02EF8D

 

Share this post


Link to post
Share on other sites
{DBC}Lance

just wondering, has anybody found out how to prevent parked cars from spawning?(no i'm not talked about the ones that were created by the main.scm)

Share this post


Link to post
Share on other sites
J-Fox.GEMM

I m sure there is a special game function which can be hooked... - I can't help u finding it.

 

But i posted on the gtat board once how to do it via scm - which is a bit buggy

Share this post


Link to post
Share on other sites
adman123

 

 

0xC1CC03 - BYTE - Invert mouse vertically

 

I disagree with the above...

 

I think it should be:

 

0xC1CC03 -- fly with mouse

 

Does anyone know what the correct code is for inverting the mouse?

 

Adman

Share this post


Link to post
Share on other sites
adman123

 

Does anyone know what the correct code is for inverting the mouse?

 

I think I found it myself... 0xBA6745 is for the inverting the mouse option...

Share this post


Link to post
Share on other sites
[FP]Gunner

in car weapons addy(s) anyone? cryani.gif

Edited by [FP]Gunner

Share this post


Link to post
Share on other sites
Jarno

Can someone give me a code or explain me how to NOP in Delphi? suicidal.gif

Share this post


Link to post
Share on other sites
Christoph680

Hello!

I've got al little question:

What mean's the CPED at the beginning of the topic?

 

Bye,

Christoph680

Share this post


Link to post
Share on other sites
Jarno

CPed = Player/Actor

CVehicle = Car/Vehicle from Player/Actor

 

 

Back to my question please rolleyes.gif :

How to NOP in Delphi?

Edited by Jarno

Share this post


Link to post
Share on other sites
random_download

 

How to NOP in Delphi?

Just write 0x90 to the correct memory location.

Edited by random_download

Share this post


Link to post
Share on other sites
[FP]Gunner

 

0xB6F99C to 0xB6F9DB = Camera Matrix  (0xB6F99C + 0x30 = Xpos, etc...) read only, unless you write retn @ 52B730

 

What is retn?? music.gif

Share this post


Link to post
Share on other sites
random_download

retn is an asm command like nop.

Edited by random_download

Share this post


Link to post
Share on other sites
[FP]Gunner

can it be done in visual basic?

Share this post


Link to post
Share on other sites
J-Fox.GEMM

I think i need to correct ya:

 

NOP = 0x90

RTN = 0x13 ? or 13 ? dno exactly

 

//Edit:

 

Would be kewl if sum1 can link me or explain how i find the addy which to NOP, RTN..

I really want to stop spammin about my problems finding em biggrin.gif

 

//Edit2:

 

Got it maybe:

 

Car wheels won't stear - so they are locked:

0x6AAD22 NOP - 6 bytes

 

Car wheels will stear but not affect:

0x6B2A60 NOP - 6 bytes

 

Car wheels won't stear but affect:

0x6AA321 NOP - 6 bytes

 

Hope they are working - havn't them tested much

 

//Edit3:

 

@Defli: I was faster

 

Edited by J-Fox.GEMM

Share this post


Link to post
Share on other sites
JernejL
How to NOP in Delphi?

Just write 0x80 to the correct memory location.

dont be funny, my intel manual says different:

 

 

*90           NOP                     No operation

 

 

$80 is

 

80    /0 ib  ADD r/m8,imm8           Add 

 

 

and this manual, you can get here:

http://forum.xbox-tribe.com/attachment.php...57&d=1068918295

 

or google using this link here:

 

http://www.google.com/search?q=%22The+Comp...ficial&filter=0

 

Share this post


Link to post
Share on other sites
random_download

 

tounge.gif I seem to think that there is an asm command "cop" also

Share this post


Link to post
Share on other sites
Kryssi (PL, DE)

 

hi,

 

i use Visual Basic and GTA.ocx

GTA.ocx

 

 

Public Const PlPointer = &HB6F5F0

Public Const CarPointer = &HB6F3B8

 

CPed = GTA1.ReadDWord(PlPointer)

CCar = GTA1.ReadDWord(CarPointer)

 

PlayerPos = GTA1.ReadDWord(CPed + &H14)

px = GTA1.ReadFloat(PlayerPos + &H30)

py = GTA1.ReadFloat(PlayerPos + &H34)

PZ = GTA1.ReadFloat(PlayerPos + &H38)

 

 

Share this post


Link to post
Share on other sites
ThaKilla

I was working on my trainer some, and came across a useful address.

 

-Current Car Pointer-

CPlayer + 192 (In dec)

 

I also noticed that CJ has the wanted level pointer address i nthe Ped block, but I tanked my saves so I couldn't really test if other peds also get a wanted level structure. But its at "CPlayer + 1152" if yall want to check it out.

Share this post


Link to post
Share on other sites
Jarno

Can someone help me with telling me how to write a String into a Textbox (Got offsets) with Delphi.

 

Thanks in advance.

Share this post


Link to post
Share on other sites
cBonky

I felt I should share all this crap as I am in a new job and no longer have the time for serious modding.

 

Bear with me here, I am trying to decipher my hieroglyphic notes as I type this so some of it may be incorrect or need alteration, I will test them all out again later and edit this post if any of this information is wrong.

 

These should all work with the original European/Australian/Hoodlum version 1.0 executables at the very least.

 

Disable Zone Name Text - (beats modifying every zone gxt entry)

 

Offset: 0x58AA6F

 

Original Value: 0x3BD6 cmp edx,esi

 

Action: Nop(0x90) the bugger into oblivion (2-BYTES)

 

 

Frame Limit for Frame Limiter

 

Offset: 0xC1704C (BYTE)

 

Original Value: 30 decimal for 25fps limit (some exe's may differ, but should be around this value regardless)

 

For me:-

38 = 30fps

46 = 35fps

55 = 40fps <- my personal favourite, 25fps is simply moronic, but it covers up many of SA's flaws.

65 = 45fps

76 = 50fps

88 = 55fps

105 = 60fps

 

Really high values screwed around too much with gameflow for me, although SA is just spastic about thread execution and absolutely retarded on multiple processors, good job rockstar!

 

 

Disable Motion Blur Effect

 

Offset: 0x8D5104

 

Original Value: 0x2400 and al,0x0

 

Action: Write Zero(0x00) to disable (BYTE)

 

 

Disable Vertigo Effect - (connected with above motion blur effect)

 

Offset: 0x524B3E

 

Original Value: 0x752E jnz short 0x00524b6e

 

Action: Write 0xEB to force jump (BYTE)

 

 

Disable Non-Highway Speed Limiter - (go fast on all roads, not just designated highways)

 

Offset: 0x72DF08

 

Original Value: 0xA3B87AC800 mov [0xC87AB8],eax

 

Action: Nop(0x90) the lot (5-BYTES)

 

 

Disable All Traffic - (parked vehicle generators will still function)

 

Offset: 0x434237

 

Default Value: 0x7D34 jge short 0x0043426d

 

Action: Write 0xEB to force jump (BYTE)

 

If you go up to 0x434222 you can alter how much traffic is permitted to be generated, 45 vehicles is the default maximum, so for instance, if you set it to 6, you will never have more than 6 other vehicles driving on the road around you.

 

 

Some or all of these may already be known but from a quick search none seem to have been shared yet, I have a fair bit more that I stumbled upon while exploring but I need to sort out my notes and test them first.

 

Happy modding all smile.gif

Edited by cBonky

Share this post


Link to post
Share on other sites
Jarno

Hi guys,

 

How to get the X, Y, Z position where the player is aiming at? 4cebbe2 posted 3 memory offsets but that's for guns like Sawnof Shotgun. That doesn't work with pistols or guns like that.

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Cowpat

 

How to get the X, Y, Z position where the player is aiming at? 4cebbe2 posted 3 memory offsets but that's for guns like Sawnof Shotgun. That doesn't work with pistols or guns like that.

Don't know which offsets 4cebbe2 posted, but here are the camera offsets I use to determine where the player is looking (and presumably shooting)

 

X B6F9AC

Y B6F9B0

Z B6F9B4

 

If those are the same offsets, sorry. If you need any help with it, give me a shout.

Share this post


Link to post
Share on other sites
Jarno

I got the same offsets. But I will focus again on it later.

 

Edit

 

CVehicle + 2468 [Float 4 bytes] - Lean forward (1.0) - Normal (0.0) - Lean backwards (-1.0)

 

 

Needs to be NOPped? suicidal.gif

Edited by Jarno

Share this post


Link to post
Share on other sites
Cowpat

As an addition to what cBonky posted above...

 

at 0x8D2538, byte, determines the number of pedestrians spawned at any one time. Originally 0x19.

 

Edit: @DexX, below. Sorry, should have been more specific. That offset controls the number of peds spawned up to the maximum permitted so if you set it to 1 only one ped is spawned, 6 for six etc. I have been fooling around with the bytes around 0xC0EC95. Last night I zeroed the 16 or so bytes starting at the offset and the game spawned increasing numbers of peds until it crashed. But of course I couldn't replicate it tonight notify.gif Likewise, I zeroed the preceeding 16 bytes or so and made it that few vehicles were spawned and those that were were cops, with the remainder made up of 'specials'. Though you had to drive to a new spawn area for it to take effect. All seemed very hit and miss though.

 

What does work though is setting the bytes between 0xC0EC79 - 95 to non-zero to make ~80% of peds spawn as cops, should you like living in a police state.

Edited by Cowpat

Share this post


Link to post
Share on other sites
DexX
As an addition to what cBonky posted above...

 

at 0x8D2538, byte, determines the number of pedestrians spawned at any one time. Originally 0x19.

i can't test this atm, but that means that 25d peds are spawned @ any given time? so what if you change the number?

 

can you set it higher, say 50-100, bump up the ped density and have more peds?

Share this post


Link to post
Share on other sites
copini

Hi,

 

I made a small program to view the player's current location on a 2D map (with weapon locations etc). I'm trying to add a teleporting option, but because the map is 2D I've only got the the X and Y coördinates to which I want to teleport.

I'm currently using a negative Z coördinate to teleport to, most of the time the player will fall for a bit and then the game automaticly teleports him to the nearest possible location. However, sometimes this doesn't work very well so I'm trying to find the correct Z coördinate for a given location.

 

Does anybody know how to get the terrain height of a given X and Y coördinate?

Share this post


Link to post
Share on other sites
Christoph680

Hi,

I've got al little question.

I'm going to make a little trainer for the new version (1.5) of my MainScripter (see ). When I try to read-out the CPed-Structure with: (Visual Basic 6)

 

 ReadProcessmemory dwProcessHandle(the Variable with the handle/id of the GTASA Process), &HB74490 (see Thread Page 1), lngReadBuffer, 4, &0 

 

the it works. It delievers me a number. Then I try the following:

 

 ReadProcessMemory dwProcessHandle, (lngReadBuffer (Carries the CPed-Structure) + &H540), lngHealthBuffer, 4, &0 

.

But everytime I try this and print it with:

 

 Debug.Print lngHealthBuffer 

 

it delivers me a 0 or a 1.

What can I do? What do I wrong?

Could any one out there please help me?

Thx,

Christoph680

 

P.S.

If it's anyone helping to understand what I mean, here's the syntax of the ReadProcessMemory-Function:

 

 Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, _   ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long 

die.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.