Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

PoliceRadarRingSA_rev1

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 5.29 KB  |  hits: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     {$CLEO .cs}
  2.     :COPRDR_1
  3.     03A4: name_thread 'COPRDR'
  4.     wait 2000
  5.     0A8C: write_memory 0x465A93 size 4 value 0x2CC239 virtual_protect 1
  6.     010D: set_player $PLAYER_CHAR wanted_level_to 2
  7.      
  8.     :COPRDR_108
  9.     0001: wait 0 ms
  10.     if
  11.     0256:   player $PLAYER_CHAR defined
  12.     004D: jump_if_false @COPRDR_108
  13.     if
  14.     010F:   player $PLAYER_CHAR wanted_level > 0
  15.     004D: jump_if_false @COPRDR_108
  16.     0390: load_txd_dictionary "COPRDR"
  17.     038F: load_texture "RDRBLUE" as 32 // Load dictionary with 0390 first
  18.     038F: load_texture "RDRWHT" as 33 // Load dictionary with 0390 first
  19.     038F: load_texture "RDRRED" as 34 // Load dictionary with 0390 first
  20.     13@ = -1
  21.     33@ = 0
  22.     30@ = 0
  23.     10@ = 0
  24.     if
  25.     0AAB:   file_exists "CLEO\PLAYLIST\DV_DRUMNBASS.MP3"
  26.     004D: jump_if_false @COPRDR_149
  27.     0AAC: 13@ = load_audiostream "CLEO\PLAYLIST\DV_DRUMNBASS.MP3"  
  28.      
  29.     :COPRDR_120
  30.     wait 0
  31.     if
  32.     8039:   NOT   13@ ==  -1
  33.     004D: jump_if_false @COPRDR_120
  34.     if
  35.     00DF:   actor $PLAYER_ACTOR driving
  36.     004D: jump_if_false @COPRDR_123
  37.     051E: 20@ = get_current_radio_station
  38.     041E: set_radio_station 11
  39.      
  40.     :COPRDR_123
  41.     0AAD: set_audiostream 13@ perform_action 1
  42.      
  43.     :COPRDR_149
  44.     0001: wait 0 ms
  45.     if
  46.     0256:   player $PLAYER_CHAR defined
  47.     004D: jump_if_false @COPRDR_333
  48.     if
  49.     010F:   player $PLAYER_CHAR wanted_level > 0
  50.     004D: jump_if_false @COPRDR_333
  51.     gosub @COPRDR_discheck_1
  52.     if
  53.     27@ == 0
  54.     jf @COPRDR_155
  55.     if  and
  56.     33@ > 250
  57.     500 > 33@
  58.     jf @COPRDR_151
  59.     03F0: enable_text_draw 1
  60.     038D: draw_texture 32 position 88.0 382.0 size 97.0 78.0 RGBA 255 255 255 200
  61.     045A: text_draw_1number  200.0  100.0 'NUMBER' 30@    // value
  62.     045A: text_draw_1number  200.0  120.0 'NUMBER' 31@    // value
  63.     jump @COPRDR_149
  64.      
  65.     :COPRDR_151
  66.     if  and
  67.     33@ > 500
  68.     750 > 33@
  69.     jf @COPRDR_153
  70.     03F0: enable_text_draw 1
  71.     038D: draw_texture 33 position 88.0 382.0 size 97.0 78.0 RGBA 255 255 255 200
  72.     045A: text_draw_1number  200.0  100.0 'NUMBER' 30@    // value
  73.     045A: text_draw_1number  200.0  120.0 'NUMBER' 31@    // value
  74.     jump @COPRDR_149
  75.      
  76.     :COPRDR_153
  77.     if  and
  78.     33@ > 750
  79.     1000 > 33@
  80.     jf @COPRDR_155
  81.     03F0: enable_text_draw 1
  82.     038D: draw_texture 34 position 88.0 382.0 size 97.0 78.0 RGBA 255 255 255 200
  83.    
  84.      
  85.     :COPRDR_155
  86.     045A: text_draw_1number  200.0  100.0 'NUMBER' 30@    // value
  87.     045A: text_draw_1number  200.0  120.0 'NUMBER' 31@    // value
  88.     if
  89.     33@ > 1000
  90.     jf @COPRDR_157
  91.     33@ = 0
  92.      
  93.     :COPRDR_157
  94.     if
  95.     00DF:   actor $PLAYER_ACTOR driving
  96.     004D: jump_if_false @COPRDR_158
  97.     if
  98.     10@ == 0
  99.     004D: jump_if_false @COPRDR_159
  100.     10@ = 1
  101.     051E: 20@ = get_current_radio_station
  102.     041E: set_radio_station 11
  103.     jump @COPRDR_159
  104.      
  105.     :COPRDR_158
  106.     if
  107.     10@ == 1
  108.     004D: jump_if_false @COPRDR_159
  109.     10@ = 0
  110.     041E: set_radio_station 20@
  111.      
  112.     :COPRDR_159
  113.     if
  114.     8039:   NOT   13@ ==  -1
  115.     004D: jump_if_false @COPRDR_160
  116.     0AB9: get_mp3 13@ state_to 18@
  117.     if
  118.     0038:   18@ == -1
  119.     004D: jump_if_false @COPRDR_160
  120.     0AAD: set_mp3 13@ perform_action 0
  121.     0AAE: release_mp3 13@
  122.     13@ = -1
  123.     jump @COPRDR_108
  124.      
  125.     :COPRDR_160
  126.     if
  127.      0AB1: call_scm_func @isTxdDictionaryLoaded 0 // by SCM (opcode 0390)
  128.     then
  129.     30@ = 0
  130.     else
  131.     30@ = 1
  132.     end
  133.    
  134.     if
  135.     30@ == 1
  136.     jf @COPRDR_149
  137.     wait 250
  138.     0390: load_txd_dictionary "COPRDR"
  139.     038F: load_texture "RDRBLUE" as 32 // Load dictionary with 0390 first
  140.     038F: load_texture "RDRWHT" as 33 // Load dictionary with 0390 first
  141.     038F: load_texture "RDRRED" as 34 // Load dictionary with 0390 first
  142.     wait 250
  143.    
  144.     if
  145.      0AB1: call_scm_func @isTxdDictionaryLoaded 0 // by SCM (opcode 0390)
  146.     then
  147.     31@ = 0
  148.     else
  149.     31@ = 1
  150.     end
  151.     jump @COPRDR_149
  152.      
  153.  
  154.      
  155.      
  156.      
  157.      
  158.     :COPRDR_333
  159.     if
  160.     8039:   NOT   13@ ==  -1
  161.     004D: jump_if_false @COPRDR_108
  162.     0AAD: set_audiostream 13@ perform_action 0
  163.     0AAE: release_mp3 13@
  164.     13@ = -1
  165.     041E: set_radio_station 20@
  166.     0002: jump @COPRDR_108
  167.      
  168.     :isTxdDictionaryLoaded
  169.     0AB1: call_scm_func @getLabelOffset 1 label @txdScriptName store_to 0@
  170.     0AA7: call_function 0x731850 num_params 1 pop 1 szFileName 0@ nResult 1@ // CTexDictionary__txdIndexByName
  171.     if
  172.      1@ <> -1
  173.     then
  174.      0485: return_true
  175.     else
  176.      059A: return_false
  177.     end
  178.     0AB2: ret 0
  179.      
  180.     :txdScriptName
  181.     hex
  182.      "script" 00
  183.     end
  184.      
  185.     :getLabelOffset
  186.     if
  187.      0@ <> 0
  188.     then
  189.      0A9F: 1@ = current_thread_pointer
  190.      1@ += 0x10
  191.      0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  192.      0062: 1@ -= 0@
  193.     else
  194.      1@ = 0
  195.     end
  196.     0AB2: ret 1 1@
  197.      
  198.      
  199.      
  200.      
  201.     :COPRDR_discheck_1
  202.     if
  203.     0AA9:    is_game_version_original
  204.     jf @COPRDR_discheck_5
  205.     0A8D: 27@ = read_memory 0xBA676C size 1 virtual_protect 0
  206.     if
  207.       27@ == 2 // hud turned off
  208.     jf @COPRDR_discheck_3
  209.     jump @COPRDR_discheck_5
  210.      
  211.     :COPRDR_discheck_3
  212.     0A8D: 27@ = read_memory 0xBAA3FB size 1 virtual_protect 0
  213.      
  214.     :COPRDR_discheck_5
  215.     return