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

Documenting GTA-SA memory addresses


JernejL
 Share

Recommended Posts

One little insight from a (vehicle-)modders view though.

There is actually no fourth carcol ingame.

Oh it's there, and it works. I used it on my escalade. From the San Andreas Vehicle Tech Doc;

 

 

Using Carcol materials on your model

Set the diffuse color of your material to one of the following colors, to have its color ingame, controlled by the carcols.dat file.

 

RGB colors for each carcol color:

Primary - 60, 255, 0 - This color

Secondary- 255, 0, 175 - This color

Third - 0 255, 255 - This color

Fourth - 255, 0, 255 - This color

 

To use the third and 4th colors, you need to put your vehicle in the "car4" section, at the end of your carcols.dat file.

 

Always read the pinned topics. I posted that info in 2006 tounge.gif

 

The function for checking if a material is carcols-compatible is at 0x004C8220. The first argument the RpMaterial* to check, the second argument is some user-supplied data.

 

Color indices for current vehicle being processed;

0x00B4E3F0 - car color index for primary color

0x00B4E3F1 - car color index for secondary color

0x00B4E3F2 - car color index for third color

0x00B4E3F3 - car color index for fourth color

 

The actual array of carcol colors is at 0x00B4E480

There's space allocated for 128 colors (at 4 bytes per color, though alpha isn't used), although it would probably be possible to create a new array of colors, and modify the game to point to the new array. You'd have to update the carcols.dat file though to actually set the extra colors to a non-zero value, and actually have vehicles that use the new colors. You'd still be limited to 256 colors though, unless you changed the indices at B4E3F0x to use something with a larger storage capacity. This is all completely untested of course.

 

0x00B4E688 - pointer to vehicle.txd

0x00B4E68C - pointer to vehiclelightson128 texture

0x00B4E690 - pointer to vehiclelights128 texture

holy sh*t, that actually really works! I guess I have to say thank you!

Funny though, that I asked about this fourth carcol several times on different forums and noone could ever help me.

And also that actually noone (besides you, I suppose) has ever used this on any carmod biggrin.gif

 

About the actual carcols, I've seen several modders adding new colors in the carcols.dat. They seem to work just by adding them to the file, without an intense modding like pointing to a new array or something. How does the game handle those? Does it just overwrite the values that are stored after the allocated carcols array? Now that would lead to the assumption, that some other gamedata is overwritten by those new colors ... right?

Link to comment
Share on other sites

gtamaster1990

Is there a memory address that holds the IDirect3D9 object created by Direct3DCreate9() ?

 

Link to comment
Share on other sites

gtamaster1990

Is there a memory address that holds the IDirect3D9 object created by Direct3DCreate9() ?

 

Link to comment
Share on other sites

Yes, and there's more than one way to get the object. What do you need to do with it? Renderware maintains an internal cache of the common d3d stuff, and accessing it directly invalidates the cache. For most of the common d3d functionality, there's an equivalent Rw function for accessing it without screwing anything up.

 

Addresses;

0x00C97C20 __RwDirect3DObject

0x00C97C28 __RwD3DDevice

 

I used this for sagfx;

HRESULT hr;

IDirect3D9* d3dObject = 0;

IDirect3DDevice9* sadevice = 0;

 

//RwD3D9GetCurrentD3DDevice is at 0x007F9D50, and returns a void pointer

sadevice = (IDirect3DDevice9*)_RwD3D9GetCurrentD3DDevice();//will invalidate the device cache!

hr = sadevice->GetDirect3D(&d3dObject);

 

@ Mindf*ck;

I haven't tried any of those carcol mods, so i'm not sure how they work, or what the game does internally. I usually only work with the default game files.

Link to comment
Share on other sites

4elovek_paket

Can anyone help me? How can I see the texture on the screen that it was in the background and did not cover on-screen elements? And how to change the coordinates of the camera on the player?

Link to comment
Share on other sites

  • 1 month later...

hi, is there anyway to check if the GTA:SA game is started or not ?

i mean exactly if the loading part is end and the player is playing, not if the game is launched or not

EDIT: solution found smile.gif

Edited by m0niSx
Link to comment
Share on other sites

  • 5 weeks later...

I need to ask a question:

What's the adress for getting the oxygen value? You know what that means, diving.

Sorry if I interrupt you guys (or bump)

Link to comment
Share on other sites

  • 2 weeks later...

My small finds:

 

0xB70154 [byte] - current month day

0xB70155 [byte] - current month

 

Used by opcode 0835.

  • Like 1
Link to comment
Share on other sites

 

0x53EAD3 - Call RenderCrosshairs (NOP 5 bytes to disable)

 

No more green crosshairs! Also disables the rocket target as well.

0x58E020 - DrawCrosshairs func

0x58FBBF - Call DrawCrosshairs (NOP 5 bytes)

 

Noping this function it should remove ONLY the crosshairs and nothing more instead.

 

Since there's no reference about how to hook a simple cheat, I'll try to explain this a-bit-unnecessary procedure. Firstly, let me show you where all cheats are located.

 

0x8A5B58 - [dword] Cheats base address

0x8A5CC8 - [dword] Hash cheats base address

 

Each cheat call/hash has 4 bytes. To retrieve the cheat number just divide the offset by 4 (useful for 0x438370, thanks to SilentPL).

 

 

Offset Description Cheat string Hash string Call
+ 0x0 Weapon Set 1 LXGIWYL 0xDE4B237D Yes
+ 0x4 Weapon Set 2 KJKSZPJ 0xB22A28D1 Yes
+ 0x8 Weapon Set 3 UZUMYMW 0x5A783FAE Yes
+ 0xC Health, Armor, $250k HESOYAM 0xEECCEA2B Yes
+ 0x10 Add 2 wanted starts OSRBLHH 0x42AF1E28 Yes
+ 0x14 Clear wanted level ASNAEB 0x555FC201 Yes
+ 0x18 Sunny weather AFZLLQLL 0x2A845345 Yes
+ 0x1C Very sunny weather ICIKPYH 0xE1EF01EA Yes
+ 0x20 Overcast weather ALNSFMZO 0x771B83FC Yes
+ 0x24 Rainy weather AUIFRVQS 0x5BF12848 Yes
+ 0x28 Foggy weather CFVFGMJ 0x44453A17 Yes
+ 0x2C Faster clock YSOHNUL 0xFCFF1D08 No
+ 0x30 Faster gameplay PPGWJHT 0xB69E8532 Yes
+ 0x34 Slower gameplay LIYOAAY 0x8B828076 Yes
+ 0x38 Peds attack other with golfclub AJLOJYQY 0xDD6ED9E9 Yes
+ 0x3C Have a bounty on your head BAGOWPG 0xA290FD8C Yes
+ 0x40 Everyone armed FOOOXFT 0x3484B5A7 No
+ 0x44 Spawn Rhino AIWPRTON 0x43DB914E Yes
+ 0x48 Spawn Bloodring Banger CQZIJMB 0xDBC0DD65 Yes
+ 0x4C Spawn Rancher JQNTDMH 0x0 Yes
+ 0x50 Spawn Hotring A PDNEJOH 0xD08A30FE Yes
+ 0x54 Spawn Hotring B VPJTQWV 0x37BF1B4E Yes
+ 0x58 Spawn Romero AQTBCODX 0xB5D40866 Yes
+ 0x5C Spawn Stretch KRIJEBR 0xE63B0D99 Yes
+ 0x60 Spawn Trashmaster UBHYZHQ 0x675B8945 Yes
+ 0x64 Spawn Caddy RZHSUEW 0x4987D5EE Yes
+ 0x68 Blow up all cars CPKTNWT 0x2E8F84E8 Yes
+ 0x6C Invisible car XICWMD 0x1A9AA3D6 No
+ 0x70 Perfect handling PGGOMOY 0xE842F3BC No
+ 0x74 Suicide SZCMAWO 0x0D5C6A4E Yes
+ 0x78 All green lights ZEIIVG 0x74D4FCB1 No
+ 0x7C Aggressive drivers YLTEICZ 0xB01D13B8 No
+ 0x80 Pink traffic LLQPFBN 0x66516EBC Yes
+ 0x84 Black traffic IOWDLAC 0x4B137E45 Yes
+ 0x88 Drive on water - 0x0 No
+ 0x8C Boats fly AFSNMSMW 0x78520E33 No
+ 0x90 Fat player BTCDBCB 0x3A577325 Yes
+ 0x94 Max muscle JYSDSOD 0xD4966D59 Yes
+ 0x98 Skinny player KVGYZQK 0x5FD1B49D Yes
+ 0x9C Elvis is everywhere ASBHGRB 0xA7613F99 Yes
+ 0xA0 Peds attack you with rockets BGLUAWML 0x1792D871 Yes
+ 0xA4 Beach party CIKGCGX 0xCBC579DF Yes
+ 0xA8 Gang members everywhere MROEMZH 0x4FEDCCFF Yes
+ 0xAC Gangs controls the streets BIFBUZZ 0x44B34866 Yes
+ 0xB0 Ninja theme AFPHULTL 0x2EF877DB Yes
+ 0xB4 Slut magnet BEKKNQV 0x2781E797 Yes
+ 0xB8 Cheap traffic BGKGTJH 0x2BC1A045 Yes
+ 0xBC Fast traffic GUSNHDE 0xB2AFE368 Yes
+ 0xC0 Cars fly RIPAZHA 0xFA8DD45B No
+ 0xC4 Huge bunny hop JHJOECW 0x8DED75BD No
+ 0xC8 Spawn Hydra JUMPJET 0x1A5526BC Yes
+ 0xCC Spawn Vortex KGGGDKP 0xA48A770B Yes
+ 0xD0 Smash n' boom JCNRUAD 0xB07D3B32 No
+ 0xD4 All cars have nitro COXEFGU 0x80C1E54B No
+ 0xD8 Cars float away when hit BSXSGGC 0x5DAD0087 No
+ 0xDC Always midnight XJVSNAJ 0x7F80B950 Yes
+ 0xE0 Stop game clock orange sky OFVIAC 0x6C0FA650 Yes
+ 0xE4 Thunder storm MGHXYRM 0xF46F2FA4 Yes
+ 0xE8 Sand storm CWJXUOC 0x70164385 Yes
+ 0xEC - - 0x0 Yes
+ 0xF0 Mega jump LFGMHAL 0x885D0B50 No
+ 0xF4 Infinite health BAGUVIX 0x151BDCB3 No
+ 0xF8 Infinite oxygen CVWKXAM 0xADFA640A No
+ 0xFC Have parachute AIYPWZQP 0xE57F96CE Yes
+ 0x100 Have getpack YECGAA 0x40CF761 Yes
+ 0x104 Never wanted AEZAKMI 0xE1B33EB9 Yes
+ 0x108 Six wanted stars LJSPQK 0xFEDA77F7 Yes
+ 0x10C Mega punch IAVENJQ 0x8CA870DD No
+ 0x110 Never get hungry AEDUWNV 0x9A629401 No
+ 0x114 Riot mode IOJUFZN 0xF53EF5A5 Yes
+ 0x118 Funhouse theme PRIEBJ 0xF2AA0C1D Yes
+ 0x11C Adrenaline mode MUNASEF 0xF36345A8 Yes
+ 0x120 Infinite ammo WANRLTW 0x8990D5E1 No
+ 0x124 Weapon aiming while driving OUIQDMW 0xB7013B1B Yes
+ 0x128 Reduced traffic THGLOJ 0xCAEC94EE No
+ 0x12C country traffic FVTMNBZ 0x31F0C3CC Yes
+ 0x130 Recruit anyone (9mm) SJMAHPE 0xB3B3E72A No
+ 0x134 Country cars and peds BMTPWHR 0xC25CDBFF No
+ 0x138 Recruit anyone (rockets) ZSOXFSQ 0xD5CF4EFF No
+ 0x13C Max respect OGXSDAG 0x680416B1 No
+ 0x140 Max sex appeal EHIBXQS 0xCF5FDA18 No
+ 0x144 Max stamina VKYPQCF 0xF01286E9 Yes
+ 0x148 Hitman level for all weapons NCSGDAG 0xA841CC0A Yes
+ 0x14C Max driving skills VQIMAHA 0x31EA09CF Yes
+ 0x150 Spawn Hunter OHDUDE 0xE958788A Yes
+ 0x154 Spawn Quad AKJJYGLC 0x2C83A7C Yes
+ 0x158 Spawn Tanker Truck AMOMHRER 0xE49C3ED4 Yes
+ 0x15C Spawn Dozer EEGCYXT 0x171BA8CC Yes
+ 0x160 Spawn Stunt Plane URKQSRK 0x86988DAE Yes
+ 0x164 Spawn Monster AGBDLCID 0x2BDD2FA1 Yes
+ 0x168 Prostitutes pay you - 0x0 No
+ 0x16C Taxi have nitrous - 0x0 No

It's possible to hook a cheat by:

  • Redirecting it's call to a nop function but still working
  • Changing it's hash string
As regards the farmer, we have to change the cheat call address and make it reading a no-operation-function (which is a cheat function as well):

 

// HESOYAM cheat no effect0A8C: write_memory 0x8A5B64 size 4 value 0x4395A0 virtual_protect 0 // 0x8A5B58 + 0x3 * 4

 

The latter just requires to modify the hash string into a weird input cheat:

 

// no more HESOYAM cheat0A8C: write_memory 0x8A5CD4 size 4 value 0xFFFFFFFF virtual_protect 0 // 0x8A5CC8 + 0x3 * 4

 

This is an example using CLEO:

 

{$CLEO}0000: NOP// disable HESOYAM cheat0A8C: write_memory 0x8A5CD4 size 4 value 0xFFFFFFFF virtual_protect 0 while true wait 0  [email protected] = "GIVEMEHEALTHARMO"  [email protected] = "URANDALOTOFMONEY"  if  0AB1: call_scm_func @testCheat 8 string [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]  then   03E5: show_text_box "CHEAT1"    // give full health   0A96: [email protected] = actor $PLAYER_ACTOR struct   [email protected] += 0x544    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // get player max health   [email protected] -= 0x4    0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 // set player max health   // give full armour   0945: get_player $PLAYER_CHAR max_armour_to [email protected]    0093: [email protected] = integer [email protected] to_float   [email protected] += 0x8    0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 // set player armour   // give $250,000   0109: player $PLAYER_CHAR money += 250000  endend:getLocalVarOffset{ Parameters:   Passed:     [email protected] - thread pointer     [email protected] - var number   Result:     [email protected] - var value Example:   0AB1: call_scm_func @getLocalVarOffset 2 thread [email protected] var 0 store_to [email protected] }if  [email protected] <> 0 then [email protected] *= 0x4  0A8E: [email protected] = [email protected] + 0xDC // mission flag if    [email protected] == 1  then   [email protected] += 0xA48960 // mission locals else   005A: [email protected] += [email protected]    [email protected] += 0x3C  endelse [email protected] = 0 end0AB2: ret 1 [email protected] :getStringLen{ Parameters:   Passed:     [email protected] - string value   Result:     [email protected] - string length Example:   0AB1: call_scm_func @getStringLen 1/4 string [email protected]/[email protected] store_to [email protected] }0A9F: [email protected] = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread [email protected] var 0 store_to [email protected] [email protected] = 0 while true 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0  if and   [email protected] > 0    [email protected] < 0x10 // 16 bytes then   [email protected] += 0x1    [email protected] += 1  else   if      [email protected] == 0    then     059A: return_false     0AB2: ret 1 0    else     break   end endend0485: return_true0AB2: ret 1 [email protected] :testCheat{ Parameters:   Passed:     [email protected] - string value   Result:     none Example:   0AB1: call_scm_func @testCheat 1/8 string [email protected]/[email protected] }0A9F: [email protected] = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread [email protected] var 0 store_to [email protected] 0AB1: call_scm_func @getStringLen 4 string [email protected] [email protected] [email protected] [email protected] store_to [email protected] 0AB1: call_scm_func @getStringLen 4 string [email protected] [email protected] [email protected] [email protected] store_to [email protected] 005A: [email protected] += [email protected] 005A: [email protected] += [email protected] [email protected] = 0x969110 // keypresses buffer0085: [email protected] = [email protected] while [email protected] > 0  [email protected] -= 0x1  0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 // last cheat char 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 // last pressed key // LowerCase -> UpperCase if    [email protected] >= 0x61    [email protected] <= 0x7A  then   [email protected] -= 0x32  end if  803B:  [email protected] <> [email protected]  then   059A: return_false   0AB2: ret 0  end [email protected] += 0x1  [email protected] -= 1 end0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0 0485: return_true0AB2: ret 0 

 

This is the script which takes part of the whole code. Learn there how to create new cheats. wink.gif

 

"Drive on water" (+ 0x22) cheat has been removed in PC version and can be enabled with the following code line:

 

0A8C: write_memory 0x8A5D50 size 4 value 0x12EDB9AF virtual_protect 0 

 

Then type GALILE while ingame (thanks to fastman92).

 

Accidently, I found out a small trick which can be used to enable the "Drive on water cheat" available for console version only:

 

0A8C: write_memory 0x8A5D14 size 4 value 0xFFFFFFFF virtual_protect 0 

 

It replaces the "Spawn Rancher" cheat, so type JQNTDMH to enable/disable it.

 

After these explanations which hopefully helps, I have more questions indeed: how to convert or retrieve the cheat string from a hash code and which is its type? CRC32? If so, would you be so kind to teach me how to do it?

Edited by Wesser

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

Link to comment
Share on other sites

  • 1 month later...

Can someone find the following adresses:

- Limit, how many entries of each group in cargrp.dat can be loaded.

Because game scans each group in cargrp.dat and loads car entries. But there limit about 20-25 cars (suposedly number). So you can`t add too many cars to GTA SA game, cuz they can be spawned, but they don`t go on the street.

- Limit, how many COL Files can be loaded from IMG archives. Limit is accurately 254 COL Files. When amount of COL files will increase to 255 or higher game will crash during 50% loading.

 

Breaking these limits will be helpful to many people modding GTA SA, I think.

  • Like 1
Link to comment
Share on other sites

spaceeinstein

There's no practical way to increase the COL limit. I don't have experience in SA but in VC each car color is 1 byte long. THe largest value it can have is "FF" (255). There are too many references to getting and setting car colors that I think is not worth the trouble trying to extend the limit.

Link to comment
Share on other sites

 

setting car colors

I guess, you don`t know what I want. I wrote nothing about hacking carcols.dat limit, but HOW MANY .col files can be exist in IMG archives. COL files aren`t colors of cars. COL files (collisions) are mainly used as related to new buildings. Currently we can add only 3 new COL files to IMG archive. When we add 4 files or more, game will crash.

Link to comment
Share on other sites

spaceeinstein

 

catspider.gif Slap me for misunderstanding. The carcol had almost the same limitation. Did you try the Limit Adjuster?

Link to comment
Share on other sites

Yes, I tried SA Limit Adjuster (I changed and unhashes collision related values), but it didn`t help.

Link to comment
Share on other sites

  • 2 weeks later...

While finding something useful in 06BC opcode offset, I noticed this function for getting the collision point between 2 points:

 

0x56BA00 : GetCollisionBetweenPoints(float *vecOrigin, float *vecTarget, float *vecPoint, DWORD *dwEntity, bool bSolid, bool bCar, bool bActor, bool bObject, bool bParticle, bool bIgnoreSeeThroughStuff, bool bIgnoreSomeObjectsForCamera, bool bIgnoreShootThroughStuff)

 

Example here.

Edited by Wesser

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

Link to comment
Share on other sites

Is there a way to respawn the player like in SA-MP?

If I set the gravity very high or very low, I see the "Loading..." message. I tried to reset the gravity and kill the player but nothing happens.

If I do the same in SA-MP (Set the gravity very high or very low and then reset the gravity and kill the player), it works: I get respawned and can continue play normally.

 

How does SA-MP handle that?

Link to comment
Share on other sites

Here is a little useful trick to retrieve any model licence plate text:

 

0xB1F650 : Base Memory Address

+ 0x4 - Start of CModelCars (size = 0x282A0)

+ 0x308 : Block Size (for each vehicle defined in vehicles.ide)+ 0x28 - Contains a pointer+ 0x0 - Pointer to CModelBase+ 0x10 - License Plate Text (8-byte string)
{ FUNCTIONS INCLUDED:-   getModelLcPlate     Type: GET       Description: Get model licence plate text.}{$CLEO}0000: NOP03F0: enable_text_draw 1 while true wait 0  if  00DF:  actor $PLAYER_ACTOR driving then   03C0: [email protected] = actor $PLAYER_ACTOR car   0441: [email protected] = car [email protected] model   0AB1: call_scm_func @getModelLcPlate 1 model [email protected] store_to [email protected] [email protected]    // now [email protected] will contain our 8-byte string endend:getModelLcPlate{ Parameters:   Passed:     [email protected] - vehicle model   Result:     [email protected]/[email protected] - plate text Example:   0AB1: call_scm_func @getModelLcPlate 1 model #LANDSTAL store_to [email protected] [email protected] }[email protected] -= 400 [email protected] *= 0x308 [email protected] += 0xB1F650 // [email protected] += 0x28 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // [email protected] += 0x10 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // License Plate [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AB2: ret 2 [email protected] [email protected] 

 

Those set by SCM will be skipped.

 

Note: License plate textes are genereted as early as a vehicle model is loaded. Unfortunately, the game sets them once so we will notice vehicles with same plates. confused.gif

Edited by Wesser

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

Link to comment
Share on other sites

  • 4 weeks later...

Hmm, why not use 0AB0 CLEO opcode?

  • Like 1
Link to comment
Share on other sites

This is my work about virtual keys. It's one of dozen files I made to be included in my sources. Maybe I'll share all of them and make you contribute on improving this project, just like a SDK for SA coding. smile.gif

 

However, you can avoid that by checking every virtual key pressed using 0AB0 as follows:

 

{$CLEO}0000: NOPwhile true wait 0  if  0AB1: call_scm_func @isAnyKeyPressed 0  then   // your code here... endend:isAnyKeyPressed{ Parameters:   Passed:     none   Result:     none Example:   0AB1: call_scm_func @isAnyKeyPressed 0 }for [email protected] = 0x1 to 0xFE // 1 to 254 if  0AB0:  key_pressed [email protected]  then   0485: return_true   0AB2: ret 0  endend059A: return_false0AB2: ret 0 

 

Actually, there's still no way to prevent many thread iterations. sad.gif

Edited by Wesser

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

Link to comment
Share on other sites

I think that cheat pool can be used for that also.

Link to comment
Share on other sites

Unfortunately, 0x969110 gives only numbers, letters and space. whatsthat.gif

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

Link to comment
Share on other sites

  • 2 weeks later...

Why don't you just use the opcode 068D?

 

CVehicle + 0x5A4 - [float] Train Speed (forward - 0.0 to 1.0, backwards - 0.0 to -1.0)

 

These values are picked according to the train track direction.

Edited by Wesser

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

Link to comment
Share on other sites

  • 2 weeks later...

i dunno if anyone said those, found them all in ryosuke's air limit changer:

 

hydra rocket reload time, just use write memory, 4 bytes, miliseconds, use them both with same value:

 

 

0x6D462E0x6D4634

 

 

hydra flares:

 

 

0x6E351B

 

 

hydra lock on delay:

 

 

0x6E363A0x6E36FB

 

 

all are 4 bytes

Edited by yair1221
Link to comment
Share on other sites

  • 2 weeks later...

 

Why don't you just use the opcode 068D?

 

Because my plan was to create an external programm, not a script. But anyway, I created a script for my requirement now.

 

Another question, is it possible to check out if a car has radio?

Link to comment
Share on other sites

Would you be more clear? Do you want to check if a vehicle can have radio stations changeable? I think, only law enforcement vehicles don't allow choosing radio stations, so use the opcode 0975.

 

Edit: Huge update of this post.

Edited by Wesser

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.