:KPP_change
wait 0
if $PLAYER_CHAR.Defined
then
if and
$PLAYER_ACTOR.Driving
84A7: not actor $PLAYER_ACTOR driving_boat
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
then
04F7: status_text $peredacha type 0 line 1 GXT 'speedo' // global_variable // Score
03C0: 1@ = actor $PLAYER_ACTOR car
0494: get joystick data 0 $left_x $left_y $rigth_x $rigth_y
if and
00E1: player 0 pressed_key 3
$rigth_y == -128
$peredacha < 6
then
$peredacha += 1
081D: set_car 1@ engine_operation 1
wait 500
02E3: 2@ = car 1@ speed
081D: set_car 1@ engine_operation 0
036A: put_actor $PLAYER_ACTOR in_car 1@
car.SetSpeedInstantly(1@,2@)
end
0494: get joystick data 0 $left_x $left_y $rigth_x $rigth_y
if and
00E1: player 0 pressed_key 3
$rigth_y == 128
$peredacha > 1
then
$peredacha -= 1
081D: set_car 1@ engine_operation 1
wait 500
02E3: 2@ = car 1@ speed
081D: set_car 1@ engine_operation 0
036A: put_actor $PLAYER_ACTOR in_car 1@
car.SetSpeedInstantly(1@,2@)
end
else
car.RemoveReferences(1@)
0151: remove_status_text $peredacha
$peredacha = 1
end
end
jump @KPP_change
:KPP_speed
wait 0
if $PLAYER_CHAR.Defined
then
if and
$PLAYER_ACTOR.Driving
84A7: not actor $PLAYER_ACTOR driving_boat
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
then
03C0: 1@ = actor $PLAYER_ACTOR car
02E3: 2@ = car 1@ speed
if and
$peredacha == 1
2@ > 8.0
81F3: not car 1@ in_air
then
car.SetSpeedInstantly(1@,8.0)
end
02E3: 2@ = car 1@ speed
if and
$peredacha == 2
2@ > 19.0
81F3: not car 1@ in_air
then
car.SetSpeedInstantly(1@,19.0)
end
02E3: 2@ = car 1@ speed
if and
$peredacha == 3
2@ > 31.0
81F3: not car 1@ in_air
then
car.SetSpeedInstantly(1@,31.0)
end
02E3: 2@ = car 1@ speed
if and
$peredacha == 4
2@ > 46.0
81F3: not car 1@ in_air
then
car.SetSpeedInstantly(1@,46.0)
end
02E3: 2@ = car 1@ speed
if and
$peredacha == 5
2@ > 63.0
81F3: not car 1@ in_air
then
car.SetSpeedInstantly(1@,63.0)
end
else
car.RemoveReferences(1@)
end
end
jump @KPP_speed
:KPP_acc
wait 0
if $PLAYER_CHAR.Defined
then
if and
$PLAYER_ACTOR.Driving
84A7: not actor $PLAYER_ACTOR driving_boat
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
then
03C0: 1@ = actor $PLAYER_ACTOR car
02E3: 3@ = car 1@ speed
wait 50
02E3: 2@ = car 1@ speed
0087: 4@ = 2@
0063: 4@ -= 3@
if and
$peredacha == 2
4@ > 0.75
81F3: not car 1@ in_air
then
02E3: 2@ = car 1@ speed
2@ -= 1.5
car.SetSpeedInstantly(1@,2@)
end
02E3: 3@ = car 1@ speed
wait 50
02E3: 2@ = car 1@ speed
0087: 4@ = 2@
0063: 4@ -= 3@
if and
$peredacha == 3
4@ > 0.65
81F3: not car 1@ in_air
then
02E3: 2@ = car 1@ speed
2@ -= 1.5
car.SetSpeedInstantly(1@,2@)
end
02E3: 3@ = car 1@ speed
wait 50
02E3: 2@ = car 1@ speed
0087: 4@ = 2@
0063: 4@ -= 3@
if and
$peredacha == 4
4@ > 0.6
81F3: not car 1@ in_air
then
02E3: 2@ = car 1@ speed
2@ -= 1.5
car.SetSpeedInstantly(1@,2@)
end
02E3: 3@ = car 1@ speed
wait 50
02E3: 2@ = car 1@ speed
0087: 4@ = 2@
0063: 4@ -= 3@
if and
$peredacha == 5
4@ > 0.45
81F3: not car 1@ in_air
then
02E3: 2@ = car 1@ speed
2@ -= 1.5
car.SetSpeedInstantly(1@,2@)
end
02E3: 3@ = car 1@ speed
wait 50
02E3: 2@ = car 1@ speed
0087: 4@ = 2@
0063: 4@ -= 3@
if and
$peredacha == 6
4@ > 0.35
81F3: not car 1@ in_air
then
02E3: 2@ = car 1@ speed
2@ -= 1.5
car.SetSpeedInstantly(1@,2@)
end
else
car.RemoveReferences(1@)
end
end
jump @KPP_acc
Скрипт написан в три потока для повышения его быстродействия