{$CLEO .cs}
{$VERSION 3.1.0040}
0000:
while true
wait 0
if and
80DF: not actor $PLAYER_ACTOR driving
0AB0: key_pressed 84 //VK_T
then
00A0: store_player $PLAYER_ACTOR position_to 1@ 2@ 3@
073E: get_car_in_sphere 1@ 2@ 3@ radius 30.0 model #TAXI handle_as 0@
if
856E: not car 0@ defined
then
073E: get_car_in_sphere 1@ 2@ 3@ radius 30.0 model #CABBIE handle_as 0@
end
if
056E: car 0@ defined
then
if and
8495: not car 0@ burning
8119: not car 0@ wrecked
81F4: not car 0@ flipped
then
046C: 16@ = car 0@ driver
01E9: 5@ = car 0@ num_passengers
if and
5@ == 0
056D: actor 16@ defined
803C: 16@ <> $PLAYER_ACTOR // (int)
then
0AB1: call_scm_func @taxi1 2 0@ 16@
if
00DB: actor $PLAYER_ACTOR in_car 0@
then
0AB1: call_scm_func @taxi2 params_count 1 0@
end
else
00BC: show_text_highpriority GXT 'ATNCLCR' time 3000 flag 1
Car.RemoveReferences(0@)
end
else
00BC: show_text_highpriority GXT 'ATNOCAB' time 3000 flag 1
Car.RemoveReferences(0@)
end
else
00BC: show_text_highpriority GXT 'ATNOCAB' time 3000 flag 1
Car.RemoveReferences(0@)
end
end
end
:taxi2
0390: load_txd_dictionary 'taxi'
038F: load_texture "map" as 127 // Load dictionary with 0390 first
038F: load_texture "cross" as 128 // Load dictionary with 0390 first
038B: load_requested
5@ = 320.0
6@ = 225.0
10@ = 3000.0
10@ /= 450.0
33@ = 3000
while true
wait 0
03F0: enable_text_draw 1
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 127 position 320.0 225.0 size 640.0 450.0 RGBA 255 255 255 255
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 128 position 5@ 6@ size 16.0 16.0 RGBA 255 255 255 255
if
0AB0: key_pressed 65
then
5@ -= 1.0
end
if
0AB0: key_pressed 68
then
5@ += 1.0
end
if
0AB0: key_pressed 87
then
6@ -= 1.0
end
if
0AB0: key_pressed 83
then
6@ += 1.0
end
0A8D: 14@ = read_memory 0xB73424 size 4 virtual_protect 1 //X
0A8D: 15@ = read_memory 0xB73428 size 4 virtual_protect 1 //Y
if
14@ <> 0
then
005B: 5@ += 14@ // (float)
end
if
15@ <> 0
then
15@ *= -1.0
005B: 6@ += 15@ // (float)
end
if
6@ < 0.0
then
6@ = 0.0
end
if
6@ > 448.0
then
6@ = 448.0
end
if
5@ < 0.0
then
5@ = 0.0
end
if
5@ > 640.0
then
5@ = 640.0
end
0087: 7@ = 5@ // (float)
7@ *= 4.6875
7@ -= 1500.0
7@ *= 2.0
0087: 8@ = 6@ // (float)
006B: 8@ *= 10@ // (float)
8@ -= 1500.0
8@ *= 2.0
0087: 9@ = 8@ // (float)
9@ *= 2.0
0063: 8@ -= 9@ // (float)
if
00E1: key_pressed 0 17
then
33@ = 0
04E4: refresh_game_renderer_at 7@ 8@
while 33@ < 3000
00AB: put_car 0@ at 7@ 8@ 100.0
03F0: enable_text_draw 1
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 127 position 320.0 225.0 size 640.0 450.0 RGBA 255 255 255 255
wait 0
04D3: get_nearest_car_path_coords_from 7@ 8@ 10.0 type 2 store_to 11@ 12@ 13@
073E: get_car_in_sphere 11@ 12@ 13@ radius 10.0 model -1 handle_as 19@
if
056E: car 19@ defined
then
Car.StorePos(19@, 11@, 12@, 13@)
23@ = Car.Angle(19@)
Car.Destroy(19@)
break
end
end
//04D3: get_nearest_car_path_coords_from 7@ 8@ 100.0 type 2 store_to 11@ 12@ 13@
00AB: put_car 0@ at 11@ 12@ 13@
Car.Angle(0@) = 23@
04BA: set_car 0@ speed_instantly 30.0
0509: 3@ = distance between point 7@ 8@ and point 11@ 12@
008C: 3@ = float_to_integer 3@
3@ *= -10
0109: player $PLAYER_CHAR money += 3@
while 00DB: actor $PLAYER_ACTOR in_car 0@
wait 200
end
00AD: set_car 0@ max_speed_to 10.0
00A7: car 0@ drive_to 0.0 0.0 0.0
00A9: set_car 0@ to_normal_driver
00AF: set_car 0@ driver_behaviour_to 13
01C3: remove_references_to_car 0@ // Like turning a car into any random car
0391: release_textures
break
end
if
80DB: not actor $PLAYER_ACTOR in_car 0@
then
00AD: set_car 0@ max_speed_to 10.0
00A7: car 0@ drive_to 0.0 0.0 0.0
00A9: set_car 0@ to_normal_driver
00AF: set_car 0@ driver_behaviour_to 13
01C3: remove_references_to_car 0@ // Like turning a car into any random car
0391: release_textures
break
end
end
0AB2: ret 0
:taxi1
{0@ - car
1@ - driver
}
02D4: car 0@ turn_off_engine
33@ = 10000
33@ *= -1
32@ = 100
15@ = 0
0186: 14@ = create_marker_above_car 0@
07E0: set_marker 14@ type_to 1
while true
wait 0
0085: 10@ = 33@ // (int)
10@ /= 1000
10@ *= -1
if and
056E: car 0@ defined
89DE: not actor $PLAYER_ACTOR entering_car
80DB: not actor $PLAYER_ACTOR in_car 0@
then
01E5: show_text_1number_highpriority GXT 'ATTHCA1' number 10@ time 1 flag 1
00AA: store_car 0@ position_to 1@ 2@ 3@
end
if and
056E: car 0@ defined
89DE: not actor $PLAYER_ACTOR entering_car
00FF: actor $PLAYER_ACTOR sphere 0 in_sphere 1@ 2@ 3@ radius 2.5 2.5 2.5 on_foot
then
00BC: text_highpriority 'ATTRME3' 1 ms 1 //
if
00E1: key_pressed 0 11
then
0209: 30@ = random_int_in_ranges 0 3
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 30@ 10000 ms
end
end
if and
056E: car 0@ defined
00DB: actor $PLAYER_ACTOR in_car 0@
then
03E6: remove_text_box
0164: disable_marker 14@
break
end
if and
056E: car 0@ defined
89DE: not actor $PLAYER_ACTOR entering_car
80DB: not actor $PLAYER_ACTOR in_car 0@
10@ <= 0
then
0164: disable_marker 14@
Car.SetMaxSpeed(0@, 30.0)
02C2: car 0@ drive_to 0.0 0.0 0.0
00AF: set_car 0@ driver_behaviour_to 13
01C3: remove_references_to_car 0@
break
end
if
856E: not car 0@ defined
then
break
end
end
0AB2: ret 0