Advertisement
HolywoodJack

VehicleImmunities_2

Dec 23rd, 2017
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. {$CLEO}
  2. 0000:
  3. //---------------Vehicle Health-----------------------
  4.  
  5. repeat
  6. wait 250
  7. until 0256: player $PLAYER_CHAR defined
  8.  
  9. while true
  10. wait 0
  11. if 0AA9: is_game_version_original
  12. then
  13. break
  14. else
  15. wait 2500
  16. if 0@ <> 172
  17. then
  18. 0ACE: show_formatted_text_box "Unsupported game version!"
  19. wait 2500
  20. 0@ = 172
  21. end
  22. end
  23. end
  24.  
  25. while true
  26. wait 0
  27. if 0AAB: file_exists "cleo\VehicleImmunities_2.ini"
  28. then
  29. break
  30. else
  31. wait 2500
  32. if 0@ <> 172
  33. then
  34. 0ACE: show_formatted_text_box "VehicleImmunities_2.ini not found!"
  35. wait 2500
  36. 0@ = 172
  37. end
  38. end
  39. end
  40.  
  41. while true
  42. wait 0
  43. 00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
  44. if 0AE2: 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 750.0 find_next 0 pass_wrecked 1
  45. then
  46. repeat
  47. 0A97: 4@ = car 3@ struct
  48. 4@ += 0x4EC
  49. 0A8D: 4@ = read_memory 4@ size 1 virtual_protect 0
  50. if 4@ <> 1
  51. then
  52. 0A97: 4@ = car 3@ struct
  53. 4@ += 0x4EC
  54. 0A8C: write_memory 4@ size 1 value 1 virtual_protect 0
  55.  
  56. 0441: 4@ = car 3@ model
  57. 0ADB: 5@v = car_model 4@ name
  58. 0AD3: string_format 9@v format "%s%s" 'MODEL_' 5@v
  59. 0AF0: 20@ = get_int_from_ini_file "cleo\VehicleImmunities_2.ini" section "VehicleHealth" key 9@v
  60. if 20@ <> -0x80000000
  61. then
  62. 0224: set_car 3@ health_to 20@
  63. end
  64. end
  65. until 8AE2: NOT 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 750.0 find_next 1 pass_wrecked 1
  66. end
  67. end // while
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement