![]() ![]() |
![]() ![]() Post #1 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | Running Scripts in a Frozen Game Here's a very cool ability! By following these few simple steps, we can have high script speed as well as the ability to execute code whilst the game is in a frozen state. I've only tested this on a stripped .scm with some CLEO's, so it is possible for bugs to occur at the hand of certain opcodes which shouldn't function. Basically, this is like allowing scripts to carry on executing when you pause the game. We can indeed actually do that. I've managed to use this to moving draw textures whilst in the main menu ![]() The main address, which freezes the game (like when paused in the menu) is: 0xB7CB49 - however, we can't use this without first patching the game to continue running the script... Enable Some Updates During Pause This enables quite a lot of things, including script parsing... But a lot of these things are stuff you would normally interact with via the scripts.
etc.. A lot of things will update, but will not appear to do so. It's confusing me slightly to figure out how it works... but I could prevent pretty much everything if needed. Anyway, to enable all this... NOP 2 bytes @ 0x53BF8A then 6 bytes @ 0x53BF96 Enable Text Draw While Frozen NOP 4 bytes @ 0x58FCC2 Includes drawing boxes, etc. Also the HUD ![]() Enable Texture Drawing While Frozen NOP 8 bytes @ 0x58D4BE This probably also enables styled text, etc. Note: It is required to use opcode 03E0 before drawing the textures if you don't want the textures to draw on top of the main menu! This should be tested against the main.scm, though. As I said, it's possible that it executes some things which will crash the game if executed while frozen... When I use it, I'll probably look towards disabling other scripts ![]() Here's a crappy screenshot: ![]() -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #2 | |
The New Guy! Posts: 4 Joined: 8-December 10 ![]() | Can be a way to create a button for quick load save, by emulating key presses in the menu? |
![]() Post #3 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | Maybe.. why don't you try and see? -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #4 | |
The New Guy! Posts: 4 Joined: 8-December 10 ![]() | My game crashes when i changing those memory. Maybe you post simple cleo script as example? |
![]() Post #5 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | SANNY {$CLEO} wait 4000 0A8C: write_memory 0x53BF8A size 2 value 0x9090 virtual_protect 1 // Enable frozen game stuff 0A8C: write_memory 0x53BF96 size 6 value 0x90 virtual_protect 1 // Enable frozen game stuff 0A8C: write_memory 0x58FCC2 size 4 value 0x90909090 virtual_protect 1 // Enable frozen game text draw 0A8C: write_memory 0x58D4BE size 8 value 0x90 virtual_protect 1 // Enable frozen game texture draw 0A8C: write_memory 0xB7CB49 size 1 value 1 virtual_protect 0 // Freeze game wait 3000 0A8C: write_memory 0x53BF8A size 2 value 0xC084 virtual_protect 1 // Disable frozen game stuff 0A8C: write_memory 0x53BF96 size 4 value 0x0298850F virtual_protect 1 // Disable frozen game stuff 0A8C: write_memory 0x53BF9A size 2 value 0x0 virtual_protect 1 // Disable frozen game stuff 0A8C: write_memory 0x58FCC2 size 4 value 0x4D75C084 virtual_protect 1 // Disable frozen game text draw 0A8C: write_memory 0x58D4BE size 4 value 0x850FC084 virtual_protect 1 // Disable frozen game texture draw 0A8C: write_memory 0x58D4C2 size 4 value 0x000000AF virtual_protect 1 // Disable frozen game texture draw 0A8C: write_memory 0xB7CB49 size 1 value 0 virtual_protect 0 // Unfreeze 0A93: -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #6 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | So, then, would this return "true" while in menu? SANNY 0A8D: 0@ = read_memory 0xB7CB49 size 1 virtual_protect false ? And, would be there any way to play sound? |
![]() Post #7 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | Well, it returns true when the game is frozen... best use 0xBA67A4 if you want to see if the menu is actually active.. -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #8 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | Yes, it works. I tried to perform audio, but it doesn't work. Seems it needed to be enabled too. |
![]() ![]() |