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

[CLEO] Full Nitro Control


Wesser
 Share

Recommended Posts

 

Full Nitro Control

A cleo modification for GTA San Andreas

1. What does this mod do?

This cleo modification allows to control the nitro consuming as you like. By default, you must use the whole nitro gas and wait until it is empty before filling up completely. That's too much research and time spending, don't you think? turn.gif

 

2. What bugs were found?

No bugs has been found till now. Feel free to notify them.

 

3. How can I decompile the script?

You can't decompile it because it is coded mostly in ASM, so the decompiler won't recognize unexisting opcodes. Anyway, it is open source.

 

4. Can I use it in my mod?

I'd be glad to see this making part of your mod. Do not forget to ask for permission, though.

 

5. Where are the screenshots, please?

They're included in the archive.

 

6. Where's the download link?

The mod is available here to download. Readme included.

 

If you have comments, opinions or evaluation you are welcome. For further information, look at the readme.

Edited by Wesser

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

Link to comment
Share on other sites

I remember seeing parts of this code some time ago, and it MUST be cool. Good work icon14.gif

 

It would be nice to see an ASI version of it though.

Link to comment
Share on other sites

user posted image

 

It works, but seemingly you forgot to remove centered number at the bottom.

I wouldn`t prefer doing like this:

 

[email protected] += 0x34 0AB1: call_scm_func @setMemOffset 3 memory [email protected] pointing_to 0x53FF90 virtual_protect 0 // [email protected] += 0x10 

 

To set pointers, but rather:

 

:readCheatStrings_push_EmptyStringAddresshex00 00 00 00E8              // call     _chdirProgramDirend:readCheatStrings_call_chdirProgramDirAddresshex00 00 00 00 68              // push     offset "rb"   end:readCheatStrings_push_offset_rb_mode_offsethex00 00 00 00// stack: -0x14FF 74 24    50  // push     [esp+50]  ; push [filepath]E8end

 

 

And:

 

0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content [email protected] source_label @readCheatStrings_push_EmptyStringAddress destination @EmptyString0AB1: call_scm_func @GetAddress_chdirProgramDir 0 store_address_to [email protected]: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content [email protected] source_label @readCheatStrings_call_chdirProgramDirAddress source_size 4 destination [email protected]: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content [email protected] source_label @readCheatStrings_push_offset_rb_mode_offset destination @RB_mode0AB1: call_scm_func @GetAddress_CFileMgr__Open 0 store_address_to [email protected] 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content [email protected] source_label @readCheatStrings_call_CFileMgr__OpenAddress source_size 4 destination [email protected]

 

Link to comment
Share on other sites

Silent, thanks for your feedback. I posted the source code at GTAG and I was unsure whether to release it or not. By the way, I'm still using VC2003 because of school (no more right now), by which I'm not able to call internal .exe functions for unknown reasons. The game always crash. confused.gif

 

fastman, thank you too. I forgot to remove a little debugging code. I updated the first post. However, I didn't understand what you're saying. You have to be more clear. wink.gif

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

Link to comment
Share on other sites

There is [email protected] to store position and you wrote code to add movement to it as many bytes as number of bytes to next relative offset.

I wouldn`t prefer adding it manually, but rather split places where offsets should be placed into label chunks:

 

:readCheatStrings// void __cdecl readCheatStrings(char* filename, void * _cheatStringHashes){Stack:-38h -   int cheatID-34h -   char * cheatString [34] 0h  -   void * return_address4h  -   char * filename8h  -   void * _cheatStringHashes}hex// stack: +0x083 EC   38      // sub      esp, 38h51              // push     ecx53              // push     ebx56              // push     esi68              // push     EmptyStringend:readCheatStrings_push_EmptyStringAddresshex00 00 00 00E8              // call     _chdirProgramDirend:readCheatStrings_call_chdirProgramDirAddresshex00 00 00 00 68              // push     offset "rb"   end:readCheatStrings_push_offset_rb_mode_offsethex00 00 00 00// stack: -0x14FF 74 24    50  // push     [esp+50]  ; push [filepath]E8end:readCheatStrings_call_CFileMgr__OpenAddresshex00 00 00 0083 C4   0C      // add      esp, 0Ch 8B F0           // mov      esi, eax        ( eax = FILE* )85 F6           // test     esi, esi      ; is file correctly opened0F 84           // jz       @@returnend

 

 

To put offset on particular label i`m using my functions:

 

0AB1: call_scm_func @Get_EXE_version_ID 0 get_version_number_to [email protected]: call_scm_func @getScriptContentPointer 0 store_script_content [email protected]: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content [email protected] source_label @readCheatStrings_push_EmptyStringAddress destination @EmptyString0AB1: call_scm_func @GetAddress_chdirProgramDir 0 store_address_to [email protected]: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content [email protected] source_label @readCheatStrings_call_chdirProgramDirAddress source_size 4 destination [email protected]: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content [email protected] source_label @readCheatStrings_push_offset_rb_mode_offset destination @RB_mode0AB1: call_scm_func @GetAddress_CFileMgr__Open 0 store_address_to [email protected] 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content [email protected] source_label @readCheatStrings_call_CFileMgr__OpenAddress source_size 4 destination [email protected]: call_scm_func @asm_PutOnLabelRelativeAddressToLabel 4 script_content [email protected] source_label @readCheatStrings_jz_returnAddress source_size 4 destination @readCheatStrings_return

 

That`s how i avoid manual calculation of pointer to relative address.

 

My functions from asm_handling.txt

 

:asm_PutOnAddressRelativeAddressToAddress{Description:    Writes at the specified address a relative adress to second adress.Type: SET Parameters:  Passed:    [email protected] - source adress    [email protected] - size of written adress (1, 2, 4)    [email protected] - source virtual protect    [email protected] - destination adress    Example: 0AB1: call_scm_func @asm_PutOnAddressRelativeAddressToAddress 4 source_adress [email protected] source_size 4 source_virtual_protect true destination 0x004912DC     }0062: [email protected] -= [email protected]  // (int)0062: [email protected] -= [email protected]  // (int)0A8C: write_memory [email protected] size [email protected] value [email protected] virtual_protect [email protected]: ret 0:asm_PutOnAddressRelativeAddressToLabel{Description:    Writes at the specified adress a relative adress to second adress.Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)     [email protected] - source adress    [email protected] - size of written adress (1, 2, 4)    [email protected] - source virtual protect    [email protected] - destination label    Example: 0AB1: call_scm_func @asm_PutOnAddressRelativeAddressToLabel 5 script_content [email protected] source_adress [email protected] source_size 4 source_virtual_protect true destination @label     }0062: [email protected] -= [email protected]  // (int)    // destination: label adress0062: [email protected] -= [email protected]  // (int)0062: [email protected] -= [email protected]  // (int)                                   0A8C: write_memory [email protected] size [email protected] value [email protected] virtual_protect [email protected]: ret 0:asm_PutOnLabelRelativeAddressToAddress{Description:    Writes at the specified label a relative adress to second adress.Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)      [email protected] - source label    [email protected] - size of written adress (1, 2, 4)    [email protected] - destination adress    Example: 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToAddress 4 script_content [email protected] source_label @function_adress source_size 4 destination 0x004912DC     }0062: [email protected] -= [email protected]  // (int) 0062: [email protected] -= [email protected]  // (int) 0062: [email protected] -= [email protected]  // (int) 0A8C: write_memory [email protected] size [email protected] value [email protected] virtual_protect false0AB2: ret 0:asm_PutOnLabelRelativeAddressToLabel{Description:    Writes at the specified label a relative adress to second label.Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)      [email protected] - source label    [email protected] - size of written adress (1, 2, 4)    [email protected] - destination label    Example: 0AB1: call_scm_func @asm_PutOnLabelRelativeAddressToLabel 4 script_content [email protected] source_label @function_source source_size 4 destination @function_destination     }0062: [email protected] -= [email protected]  // (int)    // source adress0062: [email protected] -= [email protected]  // (int)    // difference0062: [email protected] -= [email protected]  // (int)    // -= size0A8C: write_memory [email protected] size [email protected] value [email protected] virtual_protect false0AB2: ret 0:asm_PutOnAddressAbsoluteAddressToAddress:asm_PutOnAddressAnyValue{Description:    Writes at the specified adress any adress/valueType: SET Parameters:  Passed:    [email protected] - source adress    [email protected] - size of written adress (1, 2, 4)    [email protected] - source virtual protect    [email protected] - destination adress    Example: 0AB1: call_scm_func @asm_PutOnAddressAbsoluteAddressToAddress 4 source_adress [email protected] source_size 4 source_virtual_protect true destination 0x004912DC     }0A8C: write_memory [email protected] size [email protected] value [email protected] virtual_protect [email protected]: ret 0:asm_PutOnAddressAbsoluteAddressToLabel{Description:    Writes at the specified adress an absolute adress to label.Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)      [email protected] - source adress    [email protected] - source virtual protect    [email protected] - destination label    Example: 0AB1: call_scm_func @asm_PutOnAddressAbsoluteAddressToLabel 4 script_content [email protected] source_adress 0x466D44 source_virtual_protect true destination @function_destination     }0062: [email protected] -= [email protected]  // (int)    // destination adress0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect [email protected]: ret 0:asm_PutOnLabelAbsoluteAddressToLabel{Description:    Writes at the specified label an absolute adress to label.Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)      [email protected] - source label    [email protected] - destination label    Example: 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToLabel 3 script_content [email protected] source_label @function_source destination @function_destination     }0A8F: [email protected] = [email protected] - [email protected] // int   // destination adress0062: [email protected] -= [email protected]  // (int)    // source adress0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect false0AB2: ret 0:asm_PutOnLabelAbsoluteAddressToAddress:asm_PutOnLabelAnyValue{Description:    Writes at the specified label an absolute adress to second adress.Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)      [email protected] - source label    [email protected] - size of written adress (1, 2, 4)    [email protected] - destination adress    Example: 0AB1: call_scm_func @asm_PutOnLabelAbsoluteAddressToAddress 4 script_content [email protected] source_label @function_source source_size 4 destination 0x400000     }0062: [email protected] -= [email protected]  // (int)    // source adress0A8C: write_memory [email protected] size [email protected] value [email protected] virtual_protect false0AB2: ret 0:asm_GetStructOffsetLabeltoLabel{Description:    Calculates offset between first and second lableType: SET Parameters:  Passed:     [email protected] - first label    [email protected] - second labelExample: 0AB1: call_scm_func @asm_GetStructOffsetLabeltoLabel 2 base_label @vehicles second_label @vehicles_properties store_offset [email protected]}0062: [email protected] -= [email protected]  // (int)  0AB2: ret 1 [email protected] :asm_PutOnAddressJmpFarToLabel{Description:    Writes at the specified label ASM jmp far with relative address to label (0xE9 + relative address)Type: SET Parameters:  Passed:    [email protected] - adress of script content (current_thread_pointer + 0x10)      [email protected] - source address    [email protected] - source virtual protect    [email protected] - destination label    Example: 0AB1: call_scm_func @asm_PutOnAddressJmpFarToLabel 4 script_content [email protected] source_address [email protected] source_virtual_protect true destination @function_destination     } 0062: [email protected] -= [email protected]  // (int)    // destination adress0A8C: write_memory [email protected] size 1 value 0xE9 virtual_protect [email protected]@ += 10062: [email protected] -= [email protected]  // (int)    // [email protected] -= 40A8C: write_memory [email protected] size 4 value [email protected] virtual_protect [email protected]: ret 0

 

 

BTW. My nickname is fastman92, not fastman

Edited by fastman92
Link to comment
Share on other sites

Ok, now I realized the meaning of your last post. I wouldn't prefer such structure because it'll break the code understanding.

 

BTW. My nickname is fastman92, not fastman.

I know, but someone call me Wes, so... tounge2.gif

 

Anyways, this is the Mod Showroom section. You had to pm me instead. confused.gif

 

P.S. Why the profile says your birth year is '95? You said you were a lot older.

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

Link to comment
Share on other sites

P.S. Why the profile says your birth year is '95? You said you were a lot older.

When i said that?

Number 92 in nickname doesn`t determine how old i am.

Link to comment
Share on other sites

aStiffSausage
P.S. Why the profile says your birth year is '95? You said you were a lot older.

When i said that?

Number 92 in nickname doesn`t determine how old i am.

Agreed with that one. Some people think I'm born in '98 due to having 8 in my nick sometimes... sigh.gif

 

 

But, great mod, no bugs, no crashes, Wesser's quality. I like it! icon14.gif

Link to comment
Share on other sites

Sadly it doesn't work with Compact EXE, but it does work in VCS PC smile.gif

 

user posted image

 

I think it's actually one of few CLEOs not made by me that will stay in my SA installation. Awesome icon14.gif

 

Edit:

Thanks to this thing, I think I'll actually make camera shake like hell with nitro on (VCS has cam shake instead of blur). Nitro will be absent in VCS PC, but screw it. I want it.

Link to comment
Share on other sites

oksa8, thank you aswell. Your posts are always constructive. icon14.gif

 

Silent, this time I preferred to follow R*'s style. It can be seen has a feature that R* hided before realising the game.

 

 

P.S. Why the profile says your birth year is '95? You said you were a lot older.

When i said that? Number 92 in nickname doesn`t determine how old I am.

In fact I said "a lot older". I remember something you said in chat. Maybe I'm confusing you with someone else. It isn't important, though. wink.gif

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

Link to comment
Share on other sites

  • 1 year later...

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.