Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO .cs}
- if
- 8AAB: not file_exists "CLEO\RadioSurf_by_DK22Pac.cs"
- then
- 0ACA: "ERROR!"
- 0A93:
- end
- if
- 0AAB: file_exists "CLEO\radiosurf_cfg.ini"
- then
- 0AF2: 5@ = get_float_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "Radius"
- 0AF2: 6@ = get_float_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "CarVolume"
- 0AF2: 8@ = get_float_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "BikeVolume"
- 0AF0: 10@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MP3Limit"
- 0AF0: 14@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MP3Loop"
- 0AF0: 18@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MaxRadiosADD1"
- 0AF0: 19@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MaxTracksADD1"
- else
- 5@ = 30.0
- 6@ = 0.6
- 7@ = 1.0
- 10@ = 32
- 14@ = 0
- 18@ = 13
- 19@ = 10
- end
- goto @begin
- if
- 5@ > 10000.0
- then
- 5@ = 10000.0
- end
- if
- 5@ < 1.0
- then
- 5@ = 1.0
- end
- if
- 6@ > 1.0
- then
- 6@ = 1.0
- end
- if
- 6@ < 0.0
- then
- 6@ = 0.0
- end
- if
- 8@ > 1.0
- then
- 8@ = 1.0
- end
- if
- 8@ < 0.0
- then
- 8@ = 0.0
- end
- if
- 10@ > 128
- then
- 10@ = 128
- end
- if
- 10@ < 4
- then
- 10@ = 4
- end
- if
- 14@ <> 0
- then
- if
- 14@ <> 1
- then
- 14@ = 0
- end
- end
- if
- 18@ > 12
- then
- 18@ = 12
- end
- if
- 18@ < 1
- then
- 18@ = 1
- end
- if
- 19@ > 10
- then
- 19@ = 10
- end
- if
- 19@ < 1
- then
- 19@ = 1
- end
- :begin
- for 0@ = 0 to 127
- 0AC6: 1@ = label @mp3s offset
- 0A90: 2@ = 0@ * 4
- 005A: 1@ += 2@
- 0A8C: write_memory 1@ size 4 value 0 virtual_protect 0
- 003D:
- end
- while true
- 003D:
- if or
- not player.Defined(0)
- 06B9: cutscene_data_loaded
- then
- 0AB1: call_scm_func @releaseAllMP3s 0
- goto @loop1
- end
- :back4
- if
- actor.Driving($player_actor)
- then
- 0AB1: call_scm_func @releaseAllMP3s 0
- goto @loop2
- end
- :back3
- // car check
- if
- 0AE2: 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 0 pass_wrecked 1
- then
- repeat
- 0A97: 21@ = car 27@ struct
- inc(21@, 0x2538)
- 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
- if
- 22@ == 123
- then
- if or
- 8205: not actor $player_actor near_car 27@ radius 5@ 5@ 5@ flag 0
- 8ABE: not vehicle 27@ engine_on
- then
- 0A8C: write_memory 21@ size 1 value 0 virtual_protect 0
- inc(21@)
- 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
- 0AC6: 15@ = label @mp3s offset
- 0A90: 2@ = 22@ * 4
- 005A: 15@ += 2@
- 0A8D: 22@ = read_memory 15@ size 4 virtual_protect 0
- 0AAE: release_mp3 22@
- 0A8C: write_memory 15@ size 4 value 0 virtual_protect 0
- end
- end
- until 8AE2: not 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 1 pass_wrecked 1
- end
- actor.StorePos($player_actor, 29@, 30@, 31@)
- if
- 0AE2: 27@ = random_vehicle_near_point 29@ 30@ 31@ in_radius 5@ find_next 0 pass_wrecked 1
- then
- repeat
- if
- 8ABE: not vehicle 27@ engine_on
- then
- continue
- end
- 0441: 28@ = car 27@ model
- 0006: 29@ = 0x85D2CB
- 0085: 25@ = 28@
- 0012: 25@ *= 0x24
- 005A: 29@ += 25@
- 0A8D: 29@ = read_memory 29@ size 1 virtual_protect 0
- if
- 29@ <> 0
- then
- continue
- end
- 0A97: 21@ = car 27@ struct
- inc(21@, 0x2538)
- 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
- if
- 22@ == 123
- then
- 0227: 4@ = car 27@ health
- if
- 4@ <= 0
- then
- 0A8C: write_memory 21@ size 1 value 0 virtual_protect 0
- inc(21@)
- 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
- 0AC6: 14@ = label @mp3s offset
- 0A90: 2@ = 22@ * 4
- 005A: 14@ += 2@
- 0A8D: 22@ = read_memory 14@ size 4 virtual_protect 0
- 0AAE: release_mp3 22@
- 0A8C: write_memory 14@ size 4 value 0 virtual_protect 0
- end
- continue
- end
- 0A96: 17@ = actor $PLAYER_ACTOR struct
- 17@ += 0x58C
- 0A8D: 17@ = read_memory 17@ size 4 virtual_protect 0
- 0A97: 16@ = car 27@ struct
- if
- 003B: 17@ == 16@
- then
- 051E: 17@ = get_current_radio_station
- inc(17@)
- if
- 17@ == 13
- then
- continue
- end
- else
- 0209: 17@ = random_int_in_ranges 1 18@
- end
- // findFree4bytesForMP3handle
- 0085: 11@ = 10@
- dec(11@)
- for 13@ = 0 to 11@
- 0AC6: 21@ = label @mp3s offset
- 0A90: 2@ = 13@ * 4
- 005A: 21@ += 2@
- 0A8D: 12@ = read_memory 21@ size 4 virtual_protect 0
- if
- 12@ == 0
- then
- 0209: 12@ = random_int_in_ranges 0 19@
- 0AD3: 1@v = format "RS\%d\%d.mp3" 17@ 12@
- audiostream.Load3D(0@, 1@v)
- 0A8C: write_memory 21@ size 4 value 0@ virtual_protect 0
- 0A97: 21@ = car 27@ struct
- inc(21@, 0x2538)
- 0A8C: write_memory 21@ size 1 value 123 virtual_protect 0
- inc(21@)
- 0A8C: write_memory 21@ size 1 value 13@ virtual_protect 0
- audiostream.PerformAction(0@, PLAY)
- if
- 14@ == 1
- then
- audiostream.Loop(0@, true)
- end
- 0AB1: call_scm_func @isModelBikeOrQuad 1 28@ 26@
- if
- 26@ == 1
- then
- 0ABC: set_audiostream 0@ volume 8@
- else
- 0ABC: set_audiostream 0@ volume 6@
- end
- audiostream.LinkToCar(0@, 27@)
- break
- end
- end
- until 8AE2: not 27@ = random_vehicle_near_point 29@ 30@ 31@ in_radius 5@ find_next 1 pass_wrecked 1
- else
- 0AB1: call_scm_func @releaseAllMP3s 0
- end
- end
- :loop1
- while true
- 003D:
- if and
- player.Defined(0)
- 86B9:
- then
- goto @back4
- end
- end
- :loop2
- while true
- 003D:
- if and
- player.Defined(0)
- 86B9:
- then
- if
- not actor.Driving($player_actor)
- then
- goto @back3
- end
- end
- end
- :isModelBikeOrQuad
- if or
- 0@ == 462
- 0@ == 581
- 0@ == 448
- 0@ == 522
- 0@ == 461
- 0@ == 521
- 0@ == 523
- then
- 0AB2: ret 1 true
- else if
- 0@ == 463
- 0@ == 586
- 0@ == 468
- 0@ == 471
- 0@ == 571
- then
- 0AB2: ret 1 true
- end
- end
- 0AB2: ret 1 false
- :releaseAllMP3s
- for 0@ = 0 to 127
- 0AC6: 1@ = label @mp3s offset
- 0A90: 2@ = 0@ * 4
- 005A: 1@ += 2@
- 0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
- if
- 3@ <> 0
- then
- 0AAE: release_mp3 3@
- 0A8C: write_memory 1@ size 4 value 0 virtual_protect 0
- end
- end
- if
- 0AE2: 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 0 pass_wrecked 0
- then
- repeat
- 0A97: 21@ = car 27@ struct
- inc(21@, 0x2538)
- 0A8C: write_memory 21@ size 1 value 0 virtual_protect 0
- until 8AE2: not 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 1 pass_wrecked 0
- end
- 0AB2: ret 0
- :mp3s // handles buffer
- hex
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- end
Advertisement
Add Comment
Please, Sign In to add comment