Advertisement
Guest User

PoliceRadarRingIV

a guest
Apr 9th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  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 101.0 374.0 size 112.0 93.0 RGBA 255 255 255 100
  61. jump @COPRDR_149
  62.  
  63. :COPRDR_151
  64. if and
  65. 33@ > 500
  66. 750 > 33@
  67. jf @COPRDR_153
  68. 03F0: enable_text_draw 1
  69. 038D: draw_texture 33 position 101.0 374.0 size 112.0 93.0 RGBA 255 255 255 100
  70. jump @COPRDR_149
  71.  
  72. :COPRDR_153
  73. if and
  74. 33@ > 750
  75. 1000 > 33@
  76. jf @COPRDR_155
  77. 03F0: enable_text_draw 1
  78. 038D: draw_texture 34 position 101.0 374.0 size 112.0 93.0 RGBA 255 255 255 100
  79.  
  80. :COPRDR_155
  81. if
  82. 33@ > 1000
  83. jf @COPRDR_157
  84. 33@ = 0
  85.  
  86. :COPRDR_157
  87. if
  88. 00DF: actor $PLAYER_ACTOR driving
  89. 004D: jump_if_false @COPRDR_158
  90. if
  91. 10@ == 0
  92. 004D: jump_if_false @COPRDR_159
  93. 10@ = 1
  94. 051E: 20@ = get_current_radio_station
  95. 041E: set_radio_station 11
  96. jump @COPRDR_159
  97.  
  98. :COPRDR_158
  99. if
  100. 10@ == 1
  101. 004D: jump_if_false @COPRDR_159
  102. 10@ = 0
  103. 041E: set_radio_station 20@
  104.  
  105. :COPRDR_159
  106. if
  107. 8039: NOT 13@ == -1
  108. 004D: jump_if_false @COPRDR_160
  109. 0AB9: get_mp3 13@ state_to 18@
  110. if
  111. 0038: 18@ == -1
  112. 004D: jump_if_false @COPRDR_160
  113. 0AAD: set_mp3 13@ perform_action 0
  114. 0AAE: release_mp3 13@
  115. 13@ = -1
  116. jump @COPRDR_108
  117.  
  118. :COPRDR_160
  119. if
  120. 0AB1: call_scm_func @isTxdDictionaryLoaded 0 // by SCM (opcode 0390)
  121. jf @COPRDR_165
  122. 30@ = 1
  123. jump @COPRDR_149
  124.  
  125. :COPRDR_165
  126. if
  127. 30@ == 1
  128. jf @COPRDR_149
  129. 0390: load_txd_dictionary "COPRDR"
  130. 038F: load_texture "RDRBLUE" as 32 // Load dictionary with 0390 first
  131. 038F: load_texture "RDRWHT" as 33 // Load dictionary with 0390 first
  132. 038F: load_texture "RDRRED" as 34 // Load dictionary with 0390 first
  133. 30@ = 0
  134. jump @COPRDR_149
  135.  
  136.  
  137.  
  138.  
  139. :COPRDR_333
  140. if
  141. 8039: NOT 13@ == -1
  142. 004D: jump_if_false @COPRDR_108
  143. 0AAD: set_audiostream 13@ perform_action 0
  144. 0AAE: release_mp3 13@
  145. 13@ = -1
  146. 041E: set_radio_station 20@
  147. 0002: jump @COPRDR_108
  148.  
  149. :isTxdDictionaryLoaded
  150. 0AB1: call_scm_func @getLabelOffset 1 label @txdScriptName store_to 0@
  151. 0AA7: call_function 0x731850 num_params 1 pop 1 szFileName 0@ nResult 1@ // CTexDictionary__txdIndexByName
  152. if
  153. 1@ <> -1
  154. then
  155. 0485: return_true
  156. else
  157. 059A: return_false
  158. end
  159. 0AB2: ret 0
  160.  
  161. :txdScriptName
  162. hex
  163. "script" 00
  164. end
  165.  
  166. :getLabelOffset
  167. if
  168. 0@ <> 0
  169. then
  170. 0A9F: 1@ = current_thread_pointer
  171. 1@ += 0x10
  172. 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  173. 0062: 1@ -= 0@
  174. else
  175. 1@ = 0
  176. end
  177. 0AB2: ret 1 1@
  178.  
  179.  
  180. :COPRDR_discheck_1
  181. if
  182. 0AA9: is_game_version_original
  183. jf @COPRDR_discheck_5
  184. 0A8D: 27@ = read_memory 0xBA676C size 1 virtual_protect 0
  185. if
  186. 27@ == 2 // hud turned off
  187. jf @COPRDR_discheck_3
  188. jump @COPRDR_discheck_5
  189.  
  190. :COPRDR_discheck_3
  191. 0A8D: 27@ = read_memory 0xBAA3FB size 1 virtual_protect 0
  192.  
  193. :COPRDR_discheck_5
  194. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement