:NearCar
0001: wait 0 ms
00D6: if 0
8038: NOT $car == -1
004D: jump_if_false ЈЈPassenger
00D6: if 0
8038: NOT $found == 0
004D: jump_if_false ЈЈPassenger
01D4: actor $PLAYER_ACTOR go to car $car and enter it as a passenger
004F: create_thread ЈЈTest
:InCar
0001: wait 0 ms
00D6: if 0
00DB: actor $PLAYER_ACTOR in car $ca
004D: jump_if_false ЈЈInCar
0209: $what = random_int 1 3
:WhatToDo1
0001: wait 0 ms
00D6: if 0
0038: $what == 1 ;; integer values
004D: jump_if_false ЈЈWhatToDo2
01E5: text 1number highpriority "ASM3_10" $what 3000 ms 1
00AD: set_car $car max_speed_to 20.0
00AF: set car $car driver_behaviour_to 10
00A9: set car $car to normal driver
0002: jump ЈЈExit
:WhatToDo2
0001: wait 0 ms
00D6: if 0
0038: $what == 2 ;; integer values
004D: jump_if_false ЈЈExit
01E5: text 1number highpriority "ASM3_4" $what 5000 ms 1
01F0: set max wanted level to 4
00AD: set_car $car max_speed_to 40.0
00AE: unknown_set_car $car to_ignore_traffic_lights 2
00AF: set car $car driver_behaviour_to 10
00A8: set car $car to_psycho_driver
0002: jump ЈЈExit
:Exit
0001: wait 0 ms
00D6: if 0
0256: player $PLAYER_CHAR defined
004D: jump_if_false ЈЈBack
00D6: if 0
8119: NOT car $car wrecked
004D: jump_if_false ЈЈBack
00D6: if 0
00DB: actor $PLAYER_ACTOR in car $car
00D6: if 0
00E1: key pressed 0 15
004D: jump_if_false ЈЈExit
00AD: set_car $car max_speed_to 0.0
0001: wait 2000 ms
03E2: actor $PLAYER_ACTOR exit_car
utside
0001: wait 0 ms
00D6: if 0
80DB: NOT actor $PLAYER_ACTOR in car $car
004D: jump_if_false ЈЈOutside
00AD: set_car $car max_speed_to 10.0
01C3: remove_references_to_car $car
0002: jump ЈЈPassenger
004E: end_thread
:Test
0001: wait 5000 ms
00D6: if 0
80DB: NOT actor $PLAYER_ACTOR in car $car
004D: jump_if_false ЈЈEndTh
01C3: remove_references_to_car $car
004F: create_thread ЈЈPassenger