deleted account Posted March 16, 2018 Share Posted March 16, 2018 The weather effect used for the Alpha Omega fight in a mod I'm making is very glitchy and sometimes everything, even CJ himself turns invisible. To stop this from happening I have to set the time when he appears and when his second phase is triggered, but how do I stop the clock? I've tried a line of code called pause_timer which didn't stop the clock. Weather 250 is the weather I'm using, if you were wondering COMING SOON ALPHA OMEGA Link to comment Share on other sites More sharing options...
Sanmodder Posted March 16, 2018 Share Posted March 16, 2018 0A8C: write_memory 0x969168 size 1 value 1 virtual_protect 0 //on0A8C: write_memory 0x969168 size 1 value 0 virtual_protect 0 //off you can use the code Link to comment Share on other sites More sharing options...
deleted account Posted March 16, 2018 Author Share Posted March 16, 2018 It hasn't seemed to have worked Link to comment Share on other sites More sharing options...
Sanmodder Posted March 16, 2018 Share Posted March 16, 2018 (edited) it works, this is the code on the orange sky at 23: 0but do it anywayadd this opcode to a fast loop00C0: set_current_time_hours_to 23 minutes_to 0 and secondly, these opcodes stop and pause meters in missions014F: stop_timer $ 19230396: pause_timer 0 Edited March 16, 2018 by Sanmodder Link to comment Share on other sites More sharing options...
GuruGuru Posted March 16, 2018 Share Posted March 16, 2018 (edited) you can NOP out the function that updates the clock like this: 0A8C: write_memory 0x53BFBD size 5 value 0x90 virtual_protect 1 To restore the function: 0A8C: write_memory 0x53BFBD size 1 value 0xE8 virtual_protect 1 0A8C: write_memory 0x53BFBE size 1 value 0x4E virtual_protect 1 0A8C: write_memory 0x53BFBF size 1 value 0x0F virtual_protect 1 0A8C: write_memory 0x53BFC0 size 1 value 0xFF virtual_protect 1 0A8C: write_memory 0x53BFC1 size 1 value 0xFF virtual_protect 1 Edited March 16, 2018 by guru_guru Link to comment Share on other sites More sharing options...
Jack Posted March 16, 2018 Share Posted March 16, 2018 you can NOP out the function that updates the clock like this: 0A8C: write_memory 0x53BFBD size 5 value 0x90 virtual_protect 1 To restore the function: 0A8C: write_memory 0x53BFBD size 1 value 0xE8 virtual_protect 1 0A8C: write_memory 0x53BFBE size 1 value 0x4E virtual_protect 1 0A8C: write_memory 0x53BFBF size 1 value 0x0F virtual_protect 1 0A8C: write_memory 0x53BFC0 size 1 value 0xFF virtual_protect 1 0A8C: write_memory 0x53BFC1 size 1 value 0xFF virtual_protect 1 Ain't that nop only the 1st byte? Also we can't write more then 4 bytes with 0A8C at once: 0A8C: write_memory 0x53BFBD size 4 value 0x90909090 virtual_protect 1 // 4 bytes0A8C: write_memory 0x53BFC1 size 1 value 0x90 virtual_protect 1 // 5th byte And to restore the function: 0A8C: write_memory 0x53BFBD size 4 value 0xFF0F4EE8 virtual_protect 1 // 4 bytes0A8C: write_memory 0x53BFC1 size 1 value 0xFF virtual_protect 1 // 5th byte Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
GuruGuru Posted March 16, 2018 Share Posted March 16, 2018 Ain't that nop only the 1st byte? Also we can't write more then 4 bytes with 0A8C at once: 0A8C: write_memory 0x53BFBD size 4 value 0x90909090 virtual_protect 1 // 4 bytes0A8C: write_memory 0x53BFC1 size 1 value 0x90 virtual_protect 1 // 5th byte Nope,08ac acts as memory fill when using a size greater than 4.(and iirc w/ size == 3).So I'm just writing 5 consecutives NOPs. And to restore the function: 0A8C: write_memory 0x53BFBD size 4 value 0xFF0F4EE8 virtual_protect 1 // 4 bytes0A8C: write_memory 0x53BFC1 size 1 value 0xFF virtual_protect 1 // 5th byte I forgot how to rearrange the bytes,so that's why I wrote them one by one Link to comment Share on other sites More sharing options...
gts. Posted March 16, 2018 Share Posted March 16, 2018 Jack gave you a great way to lock the clock time through memory address. But if you don't want to deal with memory addresses and such, you can use 00BF to get current hour and minutes then set a loop with 00C0 to lock it and avoid any changes. In a side note you will get weird weather changes, so I recommend to lock the weather too if you want. Link to comment Share on other sites More sharing options...
deleted account Posted March 17, 2018 Author Share Posted March 17, 2018 Link to comment Share on other sites More sharing options...
Another GTA Fan Posted March 17, 2018 Share Posted March 17, 2018 (edited) The 'Pause Timer' code is for the timer used in missions like vigilante and paramedic, not the game clock The best way to "freeze" the game clock is this: {$CLEO .cs}:TEST_003A4: name_thread 'TEST':TEST_1wait 50000BF: [email protected] = current_time_hours, [email protected] = current_time_minutesif andnot [email protected] = 0not [email protected] = 0else_jump @TEST_100C0: set_current_time 0 0jump @TEST_1 Just make sure it's always looping this code so it keeps the time reseting to what you what it to be. If you want to also "lock" the weather, just insert the weather code you want under (Of above) the set current time code, and it'll keep them both the same. PS. Forgive me for making simple scripts. I'm not an expert so I don't know how to use those fancy hex lines as used above. I don't want to suggest something that I'm not even familiar with, but I'm sure someone else will help you if you want to use more advanced coding. Edited March 17, 2018 by Recommended Link to comment Share on other sites More sharing options...
deleted account Posted March 23, 2018 Author Share Posted March 23, 2018 (edited) Theres another problem, when having the script jump to the time loop for some reason the game will not allow Alpha Omega to enter Phase 2 and instead dies. I do have a few ideas of how I could solve this but advice is always nice to have And for anyone that wants to try Crackhead's script MAKE SURE the game has a second (wait 1000) to reset the time, or else the game will overload and crash I gave up trying to figure out how to let Alpha Omega enter phase 2 Edited March 23, 2018 by SpicyDragon Link to comment Share on other sites More sharing options...
skatefilter5 Posted April 14, 2018 Share Posted April 14, 2018 I have freeze time that also lock weather http://www.gtainside.com/en/sanandreas/mods/116392-freeze-time-of-the-day Take that instead I use to suffer weather bugs to in gta ug Link to comment Share on other sites More sharing options...
toonskull Posted April 18, 2018 Share Posted April 18, 2018 My brother set up variables in the Hostel mission to create a real time mission. Keep in mind this is NOT a script but replaced the whole of the main.scm for the mod. So the variables shown here are global. Initialization: [email protected] = 1 //[email protected] = 15 //[email protected] = 0 //[email protected] = 0 00C0: set_current_time_hours_to 1 minutes_to 15 Subroutine: :[email protected] > [email protected] += [email protected] = [email protected] == [email protected] = [email protected] += 1if [email protected] == [email protected] = [email protected] += 1 if [email protected] == [email protected] = 0end //hoursend //minsend //secondsend //ms00C0: set_current_time_hours_to [email protected] minutes_to [email protected] This simple subroutine makes the GTA world clock slow down to real time. 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