Advertisement
Guest User

VR 0.3.DL

a guest
Nov 8th, 2018
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.89 KB | None | 0 0
  1. {$CLEO .cs}
  2.  
  3. 0000:
  4.  
  5. wait 10000 // wait 10sec until samp is ready
  6.  
  7. const
  8. VRSTOP = 0
  9. VRREC = 1
  10. VRPLAY = 2
  11. end
  12.  
  13. 29@ = true /// LINE DRAW TRUE
  14.  
  15. while true
  16. wait 0
  17.  
  18. if and
  19. 24@ == true
  20. 25@ == true
  21. then
  22. 24@ = false
  23. 27@ = true /// ANTI BUG WHEN WE WANNA PRESS AGAIN - VRP
  24. 31@ = VRPLAY
  25. end
  26.  
  27. IF
  28. 0ADC: test_cheat "vro"
  29. THEN
  30. if
  31. 26@ == false
  32. then
  33. IF
  34. 0AAB: file_exists "CLEO\VehicleRecording.path"
  35. THEN
  36. 0B00: delete_file "CLEO\VehicleRecording.path"
  37. END
  38. 26@ = true
  39. 31@ = VRREC
  40. 0AD1: show_formatted_text_highpriority "~R~RECORDING" time 1337
  41. else
  42. 26@ = false
  43. 31@ = VRSTOP
  44. 0AD1: show_formatted_text_highpriority "~R~RECORDING STOPPED" time 1337
  45. end
  46. END
  47.  
  48. IF AND
  49. 0AAB: file_exists "CLEO\VehicleRecording.path"
  50. 0ADC: test_cheat "vrp"
  51. THEN
  52. if
  53. 27@ == false
  54. then
  55. 27@ = true
  56. 31@ = VRPLAY
  57. 0AD1: show_formatted_text_highpriority "~R~PLAYING" time 1337
  58. else
  59. 27@ = false
  60. 31@ = VRSTOP
  61. 0AD1: show_formatted_text_highpriority "~R~PLAYING STOPPED" time 1337
  62. end
  63. END
  64.  
  65. IF AND
  66. 0AAB: file_exists "CLEO\VehicleRecording.path"
  67. 0ADC: test_cheat "vrl"
  68. THEN
  69. if
  70. 25@ == false
  71. then
  72. 25@ = true
  73. 0AD1: show_formatted_text_highpriority "~R~LOOP ENABLED" time 1337
  74. else
  75. 25@ = false
  76. 0AD1: show_formatted_text_highpriority "~R~LOOP DISABLED" time 1337
  77. end
  78. END
  79.  
  80. IF
  81. 0ADC: test_cheat "line"
  82. THEN
  83. IF
  84. 29@ = false
  85. THEN
  86. 29@ = TRUE
  87. 0AD1: show_formatted_text_highpriority "~R~LINE ENABLED" time 1337
  88. ELSE
  89. 29@ = FALSE
  90. 0AD1: show_formatted_text_highpriority "~R~LINE DISABLED" time 1337
  91. END
  92. END
  93.  
  94. if and
  95. 00DF: actor $PLAYER_ACTOR driving
  96. 31@ == VRREC
  97. then
  98. 0A9A: 28@ = openfile "CLEO\VehicleRecording.path" mode "wb+"
  99. while 31@ == VRREC
  100. IF
  101. 0ADC: test_cheat "vro"
  102. THEN
  103. if
  104. 26@ == false
  105. then
  106. 26@ = true
  107. 31@ = VRREC
  108. 0AD1: show_formatted_text_highpriority "~R~RECORDING" time 1337
  109. else
  110. 26@ = false
  111. 31@ = VRSTOP
  112. 0AD1: show_formatted_text_highpriority "~R~RECORDING STOPPED" time 1337
  113. end
  114. END
  115. IF
  116. 0ADC: test_cheat "line"
  117. THEN
  118. IF
  119. 29@ == false
  120. THEN
  121. 29@ = TRUE
  122. 0AD1: show_formatted_text_highpriority "~R~LINE ENABLED" time 1337
  123. ELSE
  124. 29@ = FALSE
  125. 0AD1: show_formatted_text_highpriority "~R~LINE DISABLED" time 1337
  126. END
  127. END
  128.  
  129. if 80DF: actor $PLAYER_ACTOR driving
  130. then
  131. break
  132. end
  133.  
  134. 03C0: 0@ = actor $PLAYER_ACTOR car
  135. 0407: coords 1@ 2@ 3@ car 0@ with_offset 0.0 0.0 -0.6
  136. 02E3: 4@ = car 0@ speed
  137. 0A9E: writefile 28@ size 4 from 1@
  138. 0A9E: writefile 28@ size 4 from 2@
  139. 0A9E: writefile 28@ size 4 from 3@
  140. 0A9E: writefile 28@ size 4 from 4@
  141. 018C: play_sound 1052 at 0.0 0.0 0.0
  142. 0001: wait 0 ms
  143. if
  144. 29@ == true
  145. then
  146. 0AB1: call_scm_func @DrawTwoLinesBetweenPoints 3 1@ 2@ 3@
  147. end
  148. end
  149. 0A9B: closefile 28@
  150. 0006: 31@ = VRSTOP
  151. 26@ = false /// ANTI BUG WHEN WE WANNA PRESS AGAIN - VRO
  152. end
  153.  
  154.  
  155. if and
  156. 00DF: actor $PLAYER_ACTOR driving
  157. 31@ == VRPLAY
  158. then
  159. 0A9A: 28@ = openfile "CLEO\VehicleRecording.path" mode "rb"
  160.  
  161. while 31@ == VRPLAY
  162. IF AND
  163. 0AAB: file_exists "CLEO\VehicleRecording.path"
  164. 0ADC: test_cheat "vrp"
  165. THEN
  166. if
  167. 27@ == false
  168. then
  169. 27@ = true
  170. 31@ = VRPLAY
  171. 0AD1: show_formatted_text_highpriority "~R~PLAYING" time 1337
  172. else
  173. 27@ = false
  174. 31@ = VRSTOP
  175. 0AD1: show_formatted_text_highpriority "~R~PLAYING STOPPED" time 1337
  176. end
  177. END
  178. IF AND
  179. 0AAB: file_exists "CLEO\VehicleRecording.path"
  180. 0ADC: test_cheat "vrl"
  181. THEN
  182. if
  183. 25@ == false
  184. then
  185. 25@ = true
  186. 0AD1: show_formatted_text_highpriority "~R~LOOP ENABLED" time 1337
  187. else
  188. 25@ = false
  189. 0AD1: show_formatted_text_highpriority "~R~LOOP DISABLED" time 1337
  190. end
  191. END
  192. IF
  193. 0ADC: test_cheat "line"
  194. THEN
  195. IF
  196. 29@ == false
  197. THEN
  198. 29@ = TRUE
  199. 0AD1: show_formatted_text_highpriority "~R~LINE ENABLED" time 1337
  200. ELSE
  201. 29@ = FALSE
  202. 0AD1: show_formatted_text_highpriority "~R~LINE DISABLED" time 1337
  203. END
  204. END
  205.  
  206. if 0AD6: end_of_file 28@ reached
  207. then
  208. 24@ = true
  209. break
  210. end
  211.  
  212. if 80DF: actor $PLAYER_ACTOR driving
  213. then
  214. break
  215. end
  216.  
  217. 0A9D: readfile 28@ size 4 to 1@
  218. 0A9D: readfile 28@ size 4 to 2@
  219. 0A9D: readfile 28@ size 4 to 3@
  220. 0A9D: readfile 28@ size 4 to 4@
  221. while 8100: actor $PLAYER_ACTOR in_sphere 1@ 2@ 3@ radius 7.0 7.0 7.0 sphere 0 in_car
  222.  
  223. if 80DF: actor $PLAYER_ACTOR driving
  224. then
  225. break
  226. end
  227.  
  228. if 00DF: actor $PLAYER_ACTOR driving
  229. then
  230. 02EB: restore_camera_with_jumpcut
  231. end
  232.  
  233. if
  234. 29@ == true
  235. then
  236. 0AB1: call_scm_func @DrawLineBetweenPoints 3 1@ 2@ 3@
  237. end
  238. 0AB1: call_scm_func @TurningControl 2 1@ 2@
  239. 0AB1: call_scm_func @EngineControl 1 4@
  240.  
  241. 0001: wait 0 ms
  242. end
  243. end
  244. 0A9B: closefile 28@
  245. 0006: 31@ = VRSTOP
  246. 27@ = false /// ANTI BUG WHEN WE WANNA PRESS AGAIN - VRP
  247. end
  248. wait 0
  249. end
  250.  
  251. :DrawLineBetweenPoints
  252. 03C0: 31@ = actor $PLAYER_ACTOR car
  253. 0407: coords 4@ 5@ 6@ car 31@ with_offset 0.0 0.0 0.0
  254. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 7@ Y_to 8@
  255. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 4@ Y 5@ Z 6@ store_screen_X_to 9@ Y_to 10@
  256. 0AB1: call_scm_func @DRAW_LINE 9 x1y1 7@ 8@ x2y2 9@ 10@ thickness 2.0 R 255 G 0 B 0 A 255
  257. 0AB2: ret 0
  258.  
  259. :DrawTwoLinesBetweenPoints
  260. 03C0: 31@ = actor $PLAYER_ACTOR car
  261. 0407: coords 4@ 5@ 6@ car 31@ with_offset 0.0 0.0 0.0
  262. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 7@ Y_to 8@
  263. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 4@ Y 5@ Z 6@ store_screen_X_to 9@ Y_to 10@
  264. 0AB1: call_scm_func @DRAW_LINE 9 x1y1 7@ 8@ x2y2 9@ 10@ thickness 2.0 R 255 G 0 B 0 A 255
  265. 7@ += 5.0
  266. 0AB1: call_scm_func @DRAW_LINE 9 x1y1 7@ 8@ x2y2 9@ 10@ thickness 2.0 R 255 G 0 B 0 A 255
  267. 0AB2: ret 0
  268.  
  269. :TurningControl
  270. 03C0: 4@ = actor $PLAYER_ACTOR car
  271. 0407: coords 2@ 3@ 4@ car 4@ with_offset 0.0 0.0 0.0
  272. 0063: 0@ -= 2@
  273. 0063: 1@ -= 3@
  274. 0604: get_Z_angle_for_point 0@ 1@ store_to 31@
  275. 0172: 30@ = actor $PLAYER_ACTOR Z_angle
  276. 000F: 30@ -= 360.0
  277. 0097: make 30@ absolute_float
  278. 005B: 31@ += 30@
  279. 02F6: 30@ = sine 31@
  280. 02F7: 31@ = cosine 31@
  281. 0604: get_Z_angle_for_point 30@ 31@ store_to 31@
  282. if and
  283. 0021: 31@ > 180.0
  284. 8031: 31@ >= 358.0
  285. then //press left
  286. 0AB1: call_scm_func @PRESS_KEY 1 set_game_key_0_state -255
  287. if 8021: 31@ > 200.0
  288. then
  289. 0AB1: call_scm_func @BRAKE 1 set_game_key_6_state 255
  290. else
  291. 0AB1: call_scm_func @BRAKE 1 set_game_key_6_state 0
  292. end
  293. else
  294. if and
  295. 0021: 31@ > 2.0
  296. 8031: 31@ >= 180.0
  297. then //press right
  298. 0AB1: call_scm_func @PRESS_KEY 1 set_game_key_0_state 255
  299. if 0021: 31@ > 160.0
  300. then
  301. 0AB1: call_scm_func @BRAKE 1 set_game_key_6_state 255
  302. else
  303. 0AB1: call_scm_func @BRAKE 1 set_game_key_6_state 0
  304. end
  305. else
  306. 0AB1: call_scm_func @PRESS_KEY 1 set_game_key_0_state 0
  307. 0AB1: call_scm_func @BRAKE 1 set_game_key_6_state 0
  308. end
  309. end
  310. 0AB2: ret 0
  311.  
  312. :PRESS_KEY
  313. IF
  314. 0@ == -255
  315. THEN // PRESS LEFT
  316. 0006: 10@ = 0xB73458
  317. 000A: 10@ += 0x1
  318. 0A8C: write_memory 10@ size 1 value 128 virtual_protect 0
  319. ELSE
  320. IF
  321. 0@ == 255
  322. THEN // PRESS RIGHT
  323. 0006: 10@ = 0xB73458
  324. 000A: 10@ += 0x0
  325. 0A8C: write_memory 10@ size 1 value 128 virtual_protect 0
  326. ELSE
  327. IF
  328. 0@ == 0
  329. THEN // UNPRESS RIGHT
  330. 0006: 10@ = 0xB73458
  331. 000A: 10@ += 0x0
  332. 0A8C: write_memory 10@ size 1 value 0 virtual_protect 0
  333. END
  334. END
  335. END
  336. 0AB2: ret 0
  337.  
  338. :BRAKE
  339. IF
  340. 0@ == 255
  341. THEN
  342. 0006: 20@ = 0xB73458
  343. 000A: 20@ += 0xC
  344. 0A8C: write_memory 20@ size 1 value 255 virtual_protect 0
  345. ELSE
  346. IF
  347. 0@ == 0
  348. THEN // NOT PRESS
  349. 0006: 20@ = 0xB73458
  350. 000A: 20@ += 0xC
  351. 0A8C: write_memory 20@ size 1 value 0 virtual_protect 0
  352. END
  353. END
  354. 0AB2: ret 0
  355.  
  356. :EngineControl
  357. 03C0: 1@ = actor $PLAYER_ACTOR car
  358. 02E3: 1@ = car 1@ speed
  359. if 0025: 0@ > 1@
  360. then // gas
  361. 0006: 0@ = 0xB73458
  362. 000A: 0@ += 0x20
  363. 0A8C: write_memory 0@ size 1 value 255 virtual_protect 0
  364. else
  365. 0063: 1@ -= 0@
  366. if 1@ > 0.1
  367. then // brake
  368. 0006: 0@ = 0xB73458
  369. 000A: 0@ += 0xC
  370. 0A8C: write_memory 0@ size 1 value 255 virtual_protect 0
  371. else
  372. 0006: 0@ = 0xB73458
  373. 000A: 0@ += 0x20
  374. 0A8C: write_memory 0@ size 1 value 255 virtual_protect 0
  375. end
  376. end
  377. 0AB2: ret 0
  378.  
  379. //0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@
  380. :getScreenXYFrom3DCoords
  381. 0AC7: 14@ = var 0@ offset
  382. 0AC7: 15@ = var 3@ offset
  383. 0AC7: 16@ = var 6@ offset
  384. 0AC7: 17@ = var 9@ offset
  385. 0AA5: call 0x70CE30 num_params 6 pop 6 {18@ 18@} 0 0 17@ 16@ 15@ 14@
  386. 0007: 12@ = 640.0
  387. 0007: 13@ = 448.0
  388. 0A8D: 14@ = read_memory 0xC17044 size 4 virtual_protect 0
  389. 0A8D: 15@ = read_memory 0xC17048 size 4 virtual_protect 0
  390. 0093: 14@ = integer 14@ to_float
  391. 0093: 15@ = integer 15@ to_float
  392. 0073: 12@ /= 14@
  393. 0073: 13@ /= 15@
  394. 006B: 3@ *= 12@
  395. 006B: 4@ *= 13@
  396. 0AB2: ret 2 3@ 4@
  397.  
  398. :DRAW_LINE
  399. //0AB1: call_scm_func @DRAW_LINE 9 x1y1 0@ 1@ x2y2 2@ 3@ thickness 1.0 R 255 G 255 B 255 A 255
  400. 0509: 9@ = distance_between_XY 0@ 1@ and_XY 2@ 3@
  401. 0063: 2@ -= 0@
  402. 0063: 3@ -= 1@
  403. 0604: get_Z_angle_for_point 2@ 3@ store_to 10@
  404. 10@ += 90.0
  405. 0017: 2@ /= 2.0
  406. 0017: 3@ /= 2.0
  407. 005B: 0@ += 2@
  408. 005B: 1@ += 3@
  409. 03F0: enable_text_draw 1
  410. 074B: draw_texture 666 position 0@ 1@ scale 9@ 4@ angle 10@ color_RGBA 5@ 6@ 7@ 8@
  411. 0AB2: ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement