{$Cleo .cm}

thread 'docks'
//---Event2
:Event_2
wait 0
Model.Load(#DUNERIDE)
Model.load(#WMYCON)
038B: load_requested_models
if or
Model.Available(#DUNERIDE)
Model.Available(#WMYCON)
else_jump @Event_2
if
actor.DrivingVehicleType($PLAYER_ACTOR, #DUNERIDE)
else_jump @Event_2_E
0209: 2@ = random_int_in_ranges 0 30
0209: 3@ = random_int_in_ranges 0 30
0811: $TEMPVAR_ACTOR_CAR = actor $PLAYER_ACTOR used_car
Car.Create(1@,573,2790.14, -2455.81, 13.633)
Car.Angle(1@) = 90.0
00AD: set_car 1@ max_speed_to 5.0
//Car.SetImmunities(1@, 1, 1, 1, 1, 1)
0852: set_car 1@ damages_visible 0
Car.Create(6@,573,2785.92,-2494.42,13.652)
Car.Angle(6@) = 90.0
00AD: set_car 6@ max_speed_to 400.0
0229: set_car 1@ primary_color_to 2@ secondary_color_to 3@
//072F: enable_car 1@ stuck_check_distance 2.0 time -1 and_restore_if stuck 1 flipped 1 unk_place_on_road_properly 1 to_path 20
wait 0
0209: 2@ = random_int_in_ranges 0 30
0209: 3@ = random_int_in_ranges 0 30
0229: set_car 6@ primary_color_to 2@ secondary_color_to 3@
wait 0
actor.CreateAsDriver(2@,CIVMALE,#WMYCON,1@)
actor.CreateAsPassenger(3@,CIVMALE,#WMYCON,1@,0)
actor.CreateAsDriver(10@,CIVMALE,#WMYCON,6@)
actor.CreateAsPassenger(11@,CIVMALE,#WMYCON,6@,0)
actor.Create(4@,CIVMALE,27,2772.02, -2409.22, 13.627)
05CA: AS_actor 4@ enter_car $TEMPVAR_ACTOR_CAR passenger_seat 0 time -1
0ABF: set_vehicle $TEMPVAR_ACTOR_CAR engine_state_to 0
while not actor.InCar(4@,$TEMPVAR_ACTOR_CAR)
wait 0
end
0ABF: set_vehicle $TEMPVAR_ACTOR_CAR engine_state_to 1
marker.CreateIconAndSphere(7@,9,-1540.57, 132.77, 3.554)
Car.DriveTo(1@,2762.94,-2452.84,14.45)
Car.DriveTo(6@,2762.94,-2495.84,14.45)
wait 500
Car.DriveTo(6@,2715.01,-2505.90,14.40)
wait 8000
Car.DriveTo(6@,-1540.57,132.77,3.554)
Car.SetToPsychoDriver(6@)
Car.SetToPsychoDriver(1@)
00AD: set_car 1@ max_speed_to 500.0
06FD: set_car 1@ speed_on_path_to 500.0
00AE: set_car 1@ traffic_behaviour_to 2
00AE: set_car 6@ traffic_behaviour_to 2
05F3: set_car 1@ follow_car $TEMPVAR_ACTOR_CAR keep_Looking_Dude_I_AM_BAHEN_Y
Marker.CreateAboveCar(8@,1@)
Marker.SetColor(8@, 1)
//Marker.CreateAboveCar(9@,6@)
Model.Destroy(573)
Model.Destroy(27)
:Event_2_1
wait 0
if
00F1:   actor $PLAYER_ACTOR sphere 0 near_point -1540.57 132.77 3.554 radius 1.0 1.0 stopped_in_car
else_jump @Event_2_2
jump @Event_2_3
:Event_2_2
if
00E1:   player 0 pressed_key 88
then
Car.SetSpeedInstantly(1@,50.0)
end
wait 0
if
car.Wrecked($TEMPVAR_ACTOR_CAR)
else_jump @Event_2_1
if
actor.Driving($PLAYER_ACTOR)
else_jump @Event_2_E
0811: $TEMPVAR_ACTOR_CAR = actor $PLAYER_ACTOR used_car
if
car.Wrecked($TEMPVAR_ACTOR_CAR)
then
wait 0
0ACE: show_formatted_text_box "Faild"
player.Money($PLAYER_CHAR) += -5000
jump @Event_2_E
end
Jump @Event_2_1
:Event_2_3
if
Actor.DrivingVehicleType($PLAYER_ACTOR,573)
else_jump @Event_2_E
wait 0
if
01AD:   car 1@ sphere 0 near_point -1540.57 132.77 radius 50.0 50.0
else_jump @Event_2_4 
0ACB: show_styled_text "Docks" time 2000 style 1
Player.Money($PLAYER_CHAR) += 44000
0ACE: show_formatted_text_box "You Have Travelled A Long Journey you Own : 44000$ "
0394: play_music 2
jump @Event_2_E
:Event_2_4
0ACE: show_formatted_text_box "You Left Your Workers you Own : 12000$ "
 Player.Money($PLAYER_CHAR) += 12000
:Event_2_E
wait 0
01C2: remove_references_to_actor 2@
01C2: remove_references_to_actor 3@
01C2: remove_references_to_actor 4@
01C2: remove_references_to_actor 10@
01C2: remove_references_to_actor 11@
Car.RemoveReferences(1@)
Car.RemoveReferences(6@)
Car.RemoveReferences($TEMPVAR_ACTOR_CAR)
marker.Disable(7@)
marker.Disable(8@)
//marker.Disable(9@)
end_thread