Wesser Posted December 31, 2011 Share Posted December 31, 2011 (edited) Full Nitro ControlA 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? 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 January 22, 2012 by Wesser Jimmy, Eric_Christy, 𝓦𝓸𝓵𝓯 and 3 others 6 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Silent Posted December 31, 2011 Share Posted December 31, 2011 I remember seeing parts of this code some time ago, and it MUST be cool. Good work It would be nice to see an ASI version of it though. Link to comment Share on other sites More sharing options...
fastman92 Posted December 31, 2011 Share Posted December 31, 2011 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 More sharing options...
Wesser Posted December 31, 2011 Author Share Posted December 31, 2011 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. 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. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
fastman92 Posted December 31, 2011 Share Posted December 31, 2011 (edited) 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 December 31, 2011 by fastman92 Link to comment Share on other sites More sharing options...
Wesser Posted December 31, 2011 Author Share Posted December 31, 2011 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... Anyways, this is the Mod Showroom section. You had to pm me instead. 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 More sharing options...
fastman92 Posted December 31, 2011 Share Posted December 31, 2011 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 More sharing options...
aStiffSausage Posted December 31, 2011 Share Posted December 31, 2011 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... But, great mod, no bugs, no crashes, Wesser's quality. I like it! Link to comment Share on other sites More sharing options...
Silent Posted December 31, 2011 Share Posted December 31, 2011 Sadly it doesn't work with Compact EXE, but it does work in VCS PC I think it's actually one of few CLEOs not made by me that will stay in my SA installation. Awesome 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 More sharing options...
Wesser Posted December 31, 2011 Author Share Posted December 31, 2011 oksa8, thank you aswell. Your posts are always constructive. 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. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
hanslukaas Posted July 15, 2013 Share Posted July 15, 2013 A BIG THANK YOU FOR THIS AWESOME CLEO MOD RyanDri3957V 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now