Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO}
- 0000:
- //---------------Vehicle Health-----------------------
- repeat
- wait 250
- until 0256: player $PLAYER_CHAR defined
- while true
- wait 0
- if 0AA9: is_game_version_original
- then
- break
- else
- wait 2500
- if 0@ <> 172
- then
- 0ACE: show_formatted_text_box "Unsupported game version!"
- wait 2500
- 0@ = 172
- end
- end
- end
- while true
- wait 0
- if 0AAB: file_exists "cleo\VehicleImmunities_2.ini"
- then
- break
- else
- wait 2500
- if 0@ <> 172
- then
- 0ACE: show_formatted_text_box "VehicleImmunities_2.ini not found!"
- wait 2500
- 0@ = 172
- end
- end
- end
- while true
- wait 0
- 00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
- if 0AE2: 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 750.0 find_next 0 pass_wrecked 1
- then
- repeat
- 0A97: 4@ = car 3@ struct
- 4@ += 0x4EC
- 0A8D: 4@ = read_memory 4@ size 1 virtual_protect 0
- if 4@ <> 1
- then
- 0A97: 4@ = car 3@ struct
- 4@ += 0x4EC
- 0A8C: write_memory 4@ size 1 value 1 virtual_protect 0
- 0441: 4@ = car 3@ model
- 0ADB: 5@v = car_model 4@ name
- 0AD3: string_format 9@v format "%s%s" 'MODEL_' 5@v
- 0AF0: 20@ = get_int_from_ini_file "cleo\VehicleImmunities_2.ini" section "VehicleHealth" key 9@v
- if 20@ <> -0x80000000
- then
- 0224: set_car 3@ health_to 20@
- end
- end
- until 8AE2: NOT 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 750.0 find_next 1 pass_wrecked 1
- end
- end // while
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement