Michael-Knight1 Posted September 4, 2012 Share Posted September 4, 2012 (edited) Hi . i working into the next version of digital hud . which he include the date but i has a problem into date script , he not run ?? I Need Help Please {$CLEO}0000: NOP:Datewhile true wait 10 0AB4: [email protected] = var 0 if [email protected] == 1 then while [email protected] == 1 wait 10 0AB4: [email protected] = var 0 end repeat wait 10 00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes 005A: [email protected] += [email protected] // (int) until not [email protected] == 0 end 00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes if and [email protected] == 0 [email protected] == 0 jf continue 0AB4: [email protected] = var 7 // Get Year 0AB1: call_scm_func @Mod 2 [email protected] 10000 [email protected] [email protected] /= 10000 // Get Day 0AB1: call_scm_func @Mod 2 [email protected] 100 [email protected] [email protected] /= 100 // Add 1 Day [email protected] += 1 // Check Month if [email protected] == 2 // February then // Check for Leap Year 0086: [email protected] = [email protected] // (float) 0086: [email protected] = [email protected] // (float) 0086: [email protected] = [email protected] // (float) [email protected] /= 400 [email protected] *= 400 [email protected] /= 100 [email protected] *= 100 [email protected] /= 4 [email protected] *= 4 // Leap Year if 803B: not [email protected] == [email protected] // (int) 003B: [email protected] == [email protected] // (int) then if [email protected] > 29 then [email protected] = 1 [email protected] += 1 end else // Leap Year if 003B: [email protected] == [email protected] // (int) then if [email protected] > 29 then [email protected] = 1 [email protected] += 1 end // Not Leap Year else if [email protected] > 28 then [email protected] = 1 [email protected] += 1 end end end else // Months with 30 days if or [email protected] == 4 [email protected] == 6 [email protected] == 9 [email protected] == 11 then if [email protected] > 30 then [email protected] = 1 [email protected] += 1 end // Months with 31 days else if [email protected] > 31 then [email protected] = 1 [email protected] += 1 end end end // Advance a year if past December if [email protected] > 12 then [email protected] = 1 [email protected] += 1 end // Store the new date [email protected] *= 100 005A: [email protected] += [email protected] // (int) [email protected] *= 10000 005A: [email protected] += [email protected] // (int) 0AB3: var 7 = [email protected] // Wait until time ticks past the new day repeat wait 10 00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes 005A: [email protected] += [email protected] // (int) until not [email protected] == 0 end// Function:Mod0085: [email protected] = [email protected] // (int)0072: [email protected] /= [email protected] // (int) 006A: [email protected] *= [email protected] // (int) 0062: [email protected] -= [email protected] // (int) 0AB2: ret 1 [email protected] Edited September 4, 2012 by Michael-Knight1 Link to comment Share on other sites More sharing options...
ZAZ Posted September 4, 2012 Share Posted September 4, 2012 Is there another script which change or set var 0 or var 7 ? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Michael-Knight1 Posted September 4, 2012 Author Share Posted September 4, 2012 (edited) Is there another script which change or set var 0 or var 7 ? of course thread 'INIT'//Heat Haze, Motion Blur, Vertigo 0A8C: write_memory 0x72C1B7 size 1 value 0xEB virtual_protect 1//0A8C: write_memory 0x524B3E size 1 value 0xEB virtual_protect 1//0A8C: write_memory 0x8D5104 size 1 value 0 virtual_protect 0//Timer0A8C: write_memory 0xB7015C size 4 value 60000 virtual_protect 0//NOP Acceleration, Braking//0A8C: write_memory 0x6ADC0C size 2 value 0x8E89 virtual_protect 1//0A8C: write_memory 0x6ADC0E size 2 value 0x049C virtual_protect 1//0A8C: write_memory 0x6aDC10 size 2 value 0x0000 virtual_protect 1//0A8C: write_memory 0x6ADBFA size 2 value 0x9090 virtual_protect 1//0A8C: write_memory 0x6ADBFC size 4 value 0x90909090 virtual_protect 1//0A8C: write_memory 0x6ADC12 size 2 value 0x9090 virtual_protect 1//0A8C: write_memory 0x6ADC14 size 4 value 0x90909090 virtual_protect 1// Initialize Sounds and Variables0AB3: var 0 = 00AB3: var 7 = 102120150AB3: var 8 = 00AB3: var 9 = 00AB3: var 10 = 0 0AB3: var 12 = 00AAC: [email protected] = load_mp3 "CLEO\AUDIO\TIME_TRAVEL.MP3" 0AB3: var 900 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\TIME_TRAVEL_CUTSCENE.MP3"0AB3: var 901 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\REENTRY.MP3"0AB3: var 902 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\SPARKS2.MP3"0AB3: var 903 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\HOVER_ON.MP3"0AB3: var 904 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\HOVER_OFF.MP3"0AB3: var 905 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\EMPTY.MP3"0AB3: var 906 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\TRASH.MP3"0AB3: var 907 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\COLD.MP3"0AB3: var 908 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\VENT.MP3"0AB3: var 909 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\DOOR.MP3"0AB3: var 910 = [email protected] 0A93: end_custom_thread Edited September 4, 2012 by Michael-Knight1 Link to comment Share on other sites More sharing options...
ZAZ Posted September 4, 2012 Share Posted September 4, 2012 (edited) Is there another script which change or set var 0 or var 7 ? of course unbelievable Is there another script which change or set var 0 or var 7 ? of course thread 'INIT'//Heat Haze, Motion Blur, Vertigo 0A8C: write_memory 0x72C1B7 size 1 value 0xEB virtual_protect 1//0A8C: write_memory 0x524B3E size 1 value 0xEB virtual_protect 1//0A8C: write_memory 0x8D5104 size 1 value 0 virtual_protect 0//Timer0A8C: write_memory 0xB7015C size 4 value 60000 virtual_protect 0//NOP Acceleration, Braking//0A8C: write_memory 0x6ADC0C size 2 value 0x8E89 virtual_protect 1//0A8C: write_memory 0x6ADC0E size 2 value 0x049C virtual_protect 1//0A8C: write_memory 0x6aDC10 size 2 value 0x0000 virtual_protect 1//0A8C: write_memory 0x6ADBFA size 2 value 0x9090 virtual_protect 1//0A8C: write_memory 0x6ADBFC size 4 value 0x90909090 virtual_protect 1//0A8C: write_memory 0x6ADC12 size 2 value 0x9090 virtual_protect 1//0A8C: write_memory 0x6ADC14 size 4 value 0x90909090 virtual_protect 1// Initialize Sounds and Variables0AB3: var 0 = 00AB3: var 7 = 102120150AB3: var 8 = 00AB3: var 9 = 00AB3: var 10 = 0 0AB3: var 12 = 00AAC: [email protected] = load_mp3 "CLEO\AUDIO\TIME_TRAVEL.MP3" 0AB3: var 900 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\TIME_TRAVEL_CUTSCENE.MP3"0AB3: var 901 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\REENTRY.MP3"0AB3: var 902 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\SPARKS2.MP3"0AB3: var 903 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\HOVER_ON.MP3"0AB3: var 904 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\HOVER_OFF.MP3"0AB3: var 905 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\EMPTY.MP3"0AB3: var 906 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\TRASH.MP3"0AB3: var 907 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\COLD.MP3"0AB3: var 908 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\VENT.MP3"0AB3: var 909 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\DOOR.MP3"0AB3: var 910 = [email protected] 0A93: end_custom_thread ok, now it mades click and did you ever had the idea to display your values with text_draw codes? Edited September 4, 2012 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Michael-Knight1 Posted September 4, 2012 Author Share Posted September 4, 2012 Is there another script which change or set var 0 or var 7 ? of course unbelievable Is there another script which change or set var 0 or var 7 ? of course thread 'INIT'//Heat Haze, Motion Blur, Vertigo 0A8C: write_memory 0x72C1B7 size 1 value 0xEB virtual_protect 1//0A8C: write_memory 0x524B3E size 1 value 0xEB virtual_protect 1//0A8C: write_memory 0x8D5104 size 1 value 0 virtual_protect 0//Timer0A8C: write_memory 0xB7015C size 4 value 60000 virtual_protect 0//NOP Acceleration, Braking//0A8C: write_memory 0x6ADC0C size 2 value 0x8E89 virtual_protect 1//0A8C: write_memory 0x6ADC0E size 2 value 0x049C virtual_protect 1//0A8C: write_memory 0x6aDC10 size 2 value 0x0000 virtual_protect 1//0A8C: write_memory 0x6ADBFA size 2 value 0x9090 virtual_protect 1//0A8C: write_memory 0x6ADBFC size 4 value 0x90909090 virtual_protect 1//0A8C: write_memory 0x6ADC12 size 2 value 0x9090 virtual_protect 1//0A8C: write_memory 0x6ADC14 size 4 value 0x90909090 virtual_protect 1// Initialize Sounds and Variables0AB3: var 0 = 00AB3: var 7 = 102120150AB3: var 8 = 00AB3: var 9 = 00AB3: var 10 = 0 0AB3: var 12 = 00AAC: [email protected] = load_mp3 "CLEO\AUDIO\TIME_TRAVEL.MP3" 0AB3: var 900 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\TIME_TRAVEL_CUTSCENE.MP3"0AB3: var 901 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\REENTRY.MP3"0AB3: var 902 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\SPARKS2.MP3"0AB3: var 903 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\HOVER_ON.MP3"0AB3: var 904 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\HOVER_OFF.MP3"0AB3: var 905 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\EMPTY.MP3"0AB3: var 906 = [email protected] 0AAC: [email protected] = load_mp3 "CLEO\AUDIO\TRASH.MP3"0AB3: var 907 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\COLD.MP3"0AB3: var 908 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\VENT.MP3"0AB3: var 909 = [email protected]: [email protected] = load_mp3 "CLEO\AUDIO\DOOR.MP3"0AB3: var 910 = [email protected] 0A93: end_custom_thread ok, now it mades click and did you ever had the idea to display your values with text_draw codes? The Date & Day & Time Draw Setup is there but he show without working ?? thread "T_CIRC" [email protected] = 1gosub @Weather:datewhile true wait 10 if Player.Defined($PLAYER_CHAR) jf continue // Check to see if time machine is traveling 0AB4: [email protected] = var 0 if [email protected] == 1 then // Wait until time change flag is triggered repeat wait 10 0AB4: [email protected] = var 9 until [email protected] == 1 //set past time 0AB4: [email protected] = var 7 0AB3: var 5 = [email protected] 00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes [email protected] *= 100 005A: [email protected] += [email protected] // (int) 0AB3: var 6 = [email protected] //set current time 0AB4: [email protected] = var 3 0AB3: var 7 = [email protected] 0AB4: [email protected] = var 4 0AB1: call_scm_func @Mod 2 [email protected] 100 [email protected] [email protected] /= 100 00C0: set_current_time_hours_to [email protected] minutes_to [email protected] 0AB3: var 9 = 0 //random weather gosub @Weather // Wait until done time travelling repeat wait 10 0AB4: [email protected] = var 0 until [email protected] == 0 end // Check to see if Time Circuits are on 0AB4: [email protected] = var 1 if [email protected] == 1 jf continue // Enable/Disable Time Circuit Display if and [email protected] > 500 0AB0: key_pressed 0xDD // ']' then [email protected] *= -1 [email protected] += 1 [email protected] = 0 end // Only display if enabled if [email protected] == 1 jf continue // Check to see if car is still alive and player is inside 0AB4: [email protected] = var 8 if not Car.Wrecked([email protected]) jf continue if Actor.InCar($PLAYER_ACTOR, [email protected]) jf continue // set y position [email protected] = 200.0 // check to see if confirm is pressed or not for destination time 0AB4: [email protected] = var 10 if [email protected] < 2 then // draw destination time [email protected] = 255 [email protected] = 50 [email protected] = 50 0AB4: [email protected] = var 3 0AB4: [email protected] = var 4 gosub @dateDraw end // draw present time [email protected] += 15.0 [email protected] = 75 [email protected] = 255 [email protected] = 100 0AB4: [email protected] = var 7 00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes [email protected] *= 100 005A: [email protected] += [email protected] // (int) gosub @TimeDraw // draw last departed time [email protected] += 15.0 [email protected] = 255 [email protected] = 175 [email protected] = 100 0AB4: [email protected] = var 5 0AB4: [email protected] = var 6 gosub @dateDraw end//----------------Functions----------------//:dateDraw// MDY0AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 100AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 100AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 100AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 100AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 100AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 10//HM0AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 100AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 10 // Draw Month gosub @dateDrawSetup if or [email protected] == 0 not [email protected] == 200.0 then if [email protected] == 1 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH01" else if [email protected] == 2 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH02" else if [email protected] == 3 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH03" else if [email protected] == 4 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH04" else if [email protected] == 5 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH05" else if [email protected] == 6 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH06" else if [email protected] == 7 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH07" else if [email protected] == 8 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH08" else if [email protected] == 9 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH09" else if [email protected] == 10 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH10" else if [email protected] == 11 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH11" else if [email protected] == 12 then 033E: set_draw_text_position 420.0 [email protected] GXT "MONTH12" else 033E: set_draw_text_position 420.0 [email protected] GXT "ERR" end end end end end end end end end end end end end// Draw Daygosub @dateCircuitsDrawSetup 045A: draw_text_1number 455.0 [email protected] GXT "DAY" number [email protected] gosub @dateCircuitsDrawSetup 045A: draw_text_1number 465.0 [email protected] GXT "DAY" number [email protected] gosub @dateCircuitsDrawSetup// Draw Year 045A: draw_text_1number 480.0 [email protected] GXT "YEAR" number [email protected] gosub @dateCircuitsDrawSetup 045A: draw_text_1number 490.0 [email protected] GXT "YEAR" number [email protected] gosub @dateCircuitsDrawSetup 045A: draw_text_1number 500.0 [email protected] GXT "YEAR" number [email protected] gosub @dateCircuitsDrawSetup 045A: draw_text_1number 510.0 [email protected] GXT "YEAR" number [email protected] // Convert from 24h to 12h and display am/pmgosub @dateDrawSetup if [email protected] < 12then if [email protected] == 0 then [email protected] = 12 end if not [email protected] > 500 then 033E: set_draw_text_position 547.5 [email protected] GXT "AM" else 033E: set_draw_text_position 583.5 [email protected] GXT "AM1" endelse if [email protected] > 12 then [email protected] -= 12 end if not [email protected] > 500 then 033E: set_draw_text_position 547.5 [email protected] GXT "PM" else 033E: set_draw_text_position 583.5 [email protected] GXT "PM1" end end// Draw Hour0AB1: call_scm_func @Mod 2 [email protected] 10 [email protected]@ /= 10 gosub @dateDrawSetup 045A: draw_text_1number 527.5 [email protected] GXT "HOUR" number [email protected] gosub @dateDrawSetup 045A: draw_text_1number 537.5 [email protected] GXT "HOUR" number [email protected] // Draw Minutegosub @dateDrawSetup 045A: draw_text_1number 552.5 [email protected] GXT "MINUTE" number [email protected] gosub @dateDrawSetup 045A: draw_text_1number 562.5 [email protected] GXT "MINUTE" number [email protected] // Reset colon if neededif [email protected] > 999 then [email protected] = 0end return :dateDrawSetup0340: set_text_draw_RGBA [email protected] [email protected] [email protected] 255 0341: unknown_text_draw_flag 1 03E4: enable_text_draw_align_right 0 0343: set_text_draw_linewidth 5000.0 0348: enable_text_draw_proportional 1 0342: enable_text_draw_centered 0 0345: enable_text_draw_background 0 033F: set_text_draw_letter_size 0.5 1.8 return :Weather if 0583: player $PLAYER_CHAR in_zone 'LA'then 0209: [email protected] = random_int_in_ranges 0 5 else if 0583: player $PLAYER_CHAR in_zone 'SF'then 0209: [email protected] = random_int_in_ranges 5 10else if 0583: player $PLAYER_CHAR in_zone 'VE'then 0209: [email protected] = random_int_in_ranges 10 13else if 0583: player $PLAYER_CHAR in_zone 'RED' 0583: player $PLAYER_CHAR in_zone 'FLINTC' 0583: player $PLAYER_CHAR in_zone 'WHET'then 0209: [email protected] = random_int_in_ranges 13 17else if 0583: player $PLAYER_CHAR in_zone 'ROBAD' 0583: player $PLAYER_CHAR in_zone 'BONE' then 0209: [email protected] = random_int_in_ranges 17 19endend end end endset_weather [email protected] 01B7: release_weather return:Mod0085: [email protected] = [email protected] // (int)0072: [email protected] /= [email protected] // (int) 006A: [email protected] *= [email protected] // (int) 0062: [email protected] -= [email protected] // (int) 0AB2: ret 1 [email protected] Link to comment Share on other sites More sharing options...
ZAZ Posted September 4, 2012 Share Posted September 4, 2012 compilation error: Label dateCircuitsDrawSetup not found gosub @dateCircuitsDrawSetup compilation error: Label TimeDraw not found gosub @TimeDraw CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Michael-Knight1 Posted September 4, 2012 Author Share Posted September 4, 2012 compilation error: Label dateCircuitsDrawSetup not found gosub @dateCircuitsDrawSetup compilation error: Label TimeDraw not found gosub @TimeDraw i'am stupid Thanks you so much 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