I need help with a CLEO script

Afk3131

Новичок
Автор темы
1
0
Hello,
I have this cleo script, which is AUTO DRIVE, but it drives only to Custom Checkpoints (Which are placed by players through the map)
I want it to check for Race Checkpoints, if available, it will go to it, if not, then it will go the Custom Checkpoints, and it will repeat the same process again and again.
script:
CLEO:
{$CLEO .cs}

30@ = 0
4@ = 50.0

:Noname_17
wait 0
if
  Player.IsPlaying($player1)
goto_if_false @Noname_730
if and
  Char.IsInAnyCar($scplayer)
  not Char.IsInModel($scplayer, 537)
  not Char.IsInModel($scplayer, 538)
  not Char.IsInAnyBoat($scplayer)
  not Char.IsInFlyingVehicle($scplayer)
goto_if_false @Noname_309
0@ = Char.StoreCarIsInNoSave($scplayer)
if
  Pad.IsKeyPressed(KeyCode.Z)
goto_if_false @Noname_200
if and
  Car.DoesExist(0@)
  1@, 2@, 3@ = World.GetTargetCoords()
goto_if_false @Noname_188
Sound.AddOneOffSound(0.0, 0.0, 0.0, ScriptSound.SoundPartMissionComplete)
if
  30@ == 0
goto_if_false @Noname_181
gosub @Noname_842
goto @Noname_188

:Noname_181
gosub @Noname_737

:Noname_188
cleo_call @Noname_1335 {numParams} 1 {params} 90

:Noname_200
if
  22@ == 0
  Pad.IsKeyPressed(KeyCode.Shift)
goto_if_false @Noname_262
21@ = Char.GetCurrentWeapon($scplayer)
if and
  21@ >= 22
  21@ <= 32
goto_if_false @Noname_262
gosub @Noname_1209

:Noname_262
if
  22@ <> 0
goto_if_false @Noname_309
if
  Pad.IsKeyPressed(KeyCode.Shift)
goto_if_false @Noname_302
goto @Noname_309

:Noname_302
gosub @Noname_1260

:Noname_309
if
  30@ == 1
goto_if_false @Noname_693
if or
  Pad.IsButtonPressed(PadId.Pad1, Button.Triangle)
  Car.IsInWater(0@)
  Car.IsDead(0@)
goto_if_false @Noname_361
gosub @Noname_737

:Noname_361
if and
  Car.DoesExist(0@)
  Car.IsUpsidedown(0@)
goto_if_false @Noname_389
gosub @Noname_796

:Noname_389
if
  notCar.DoesExist(0@)
goto_if_false @Noname_419
30@ = 0
goto @Noname_686

:Noname_419
if
  not Char.IsInCar($scplayer, 0@)
goto_if_false @Noname_445
30@ = 0

:Noname_445
if and
  Pad.IsKeyPressed(KeyCode.A)
  1@, 2@, 3@ = World.GetTargetCoords()
goto_if_false @Noname_490
gosub @Noname_925
cleo_call @Noname_1335 {numParams} 1 {params} 65

:Noname_490
if
  Pad.IsKeyPressed(KeyCode.Space)
goto_if_false @Noname_574
Text.LoadMissionText('FTRAIN')
if
  29@ == 0
goto_if_false @Noname_560
cleo_call @Noname_1363 {numParams} 4 {params} 10 1 -1647 3
29@ = 1

:Noname_560
gosub @Noname_975
goto @Noname_611

:Noname_574
if
  29@ == 1
goto_if_false @Noname_611
29@ = 0
cleo_call @Noname_1429 {numParams} 1 {params} 10

:Noname_611
if
  Car.LocateStopped2D(0@, 1@, 2@, 3.0, 3.0, False)
goto_if_false @Noname_652
gosub @Noname_737

:Noname_652
if
  Pad.IsKeyPressed(KeyCode.X)
goto_if_false @Noname_686
gosub @Noname_1106
cleo_call @Noname_1335 {numParams} 1 {params} 88

:Noname_686
goto @Noname_730

:Noname_693
if
  29@ == 1
goto_if_false @Noname_730
29@ = 0
cleo_call @Noname_1429 {numParams} 1 {params} 10

:Noname_730
goto @Noname_17

:Noname_737
30@ = 0
Task.WarpCharIntoCarAsDriver($scplayer, 0@)
Car.SetTraction(0@, 1.0)
Car.MarkAsNoLongerNeeded(0@)
Car.SetStrong(0@, False)
Sound.AddOneOffSound(0.0, 0.0, 0.0, ScriptSound.SoundPartMissionComplete)
return

:Noname_796
5@ = Car.GetHeading(0@)
6@, 7@, 8@ = Car.GetCoordinates(0@)
Car.SetCoordinates(0@, 6@, 7@, 8@)
Car.SetHeading(0@, 5@)
return

:Noname_842
30@ = 1
3@ = World.GetGroundZFor3DCoord(1@, 2@, 3@)
Car.SetMission(0@, CarMission.None)
Car.SetDrivingStyle(0@, DrivingMode.AvoidCars)
Car.SetTraction(0@, 2.0)
Car.SetStrong(0@, True)
Car.GotoCoordinates(0@, 1@, 2@, 3@)
Car.SetCruiseSpeed(0@, 4@)
20@ = 0
return

:Noname_925
3@ = World.GetGroundZFor3DCoord(1@, 2@, 3@)
Car.GotoCoordinates(0@, 1@, 2@, 3@)
Sound.AddOneOffSound(0.0, 0.0, 0.0, ScriptSound.SoundPartMissionComplete)
return

:Noname_975
if and
  4@ > 3.5
  Pad.IsKeyPressed(KeyCode.Down)
  TIME >= 75
goto_if_false @Noname_1032
TIMER = 0
4@ += -0.5
Car.SetCruiseSpeed(0@, 4@)

:Noname_1032
if and
  4@ < 50.0
  Pad.IsKeyPressed(KeyCode.Up)
  TIME >= 75
goto_if_false @Noname_1089
TIMER = 0
4@ += 0.5
Car.SetCruiseSpeed(0@, 4@)

:Noname_1089
cset_lvar_int_to_lvar_float 10@ =# 4@
10@ *= 2
return

:Noname_1106
if
  20@ == 0
goto_if_false @Noname_1152
20@ = 1
Car.SetDrivingStyle(0@, DrivingMode.SlowDownForCars)
Car.SetMission(0@, CarMission.Cruise)
goto @Noname_1187

:Noname_1152
20@ = 0
Car.SetDrivingStyle(0@, DrivingMode.AvoidCars)
Car.SetMission(0@, CarMission.None)
Car.GotoCoordinates(0@, 1@, 2@, 3@)

:Noname_1187
Sound.AddOneOffSound(0.0, 0.0, 0.0, ScriptSound.SoundPartMissionComplete)
return

:Noname_1209
22@ = 1
Task.DriveBy($scplayer, -1, -1, 0.0, 0.0, 0.0, 300.0, DriveByType.Ai, False, 75)
Clock.SetTimeScale(0.5)
return

:Noname_1260
22@ = 0
Task.WarpCharIntoCarAsDriver($scplayer, 0@)
if
  30@ == 1
goto_if_false @Noname_1326

:Noname_1293
wait 0
  Char.IsInCar($scplayer, 0@)
goto_if_false @Noname_1293
Car.GotoCoordinates(0@, 1@, 2@, 3@)

:Noname_1326
Clock.SetTimeScale(1.0)
return

:Noname_1335
  Pad.IsKeyPressed(0@)
goto_if_false @Noname_1358
wait 0
goto @Noname_1335

:Noname_1358
cleo_return 0 {retParams}

:Noname_1363
cleo_call @Noname_1470 {numParams} 1 {params} 0@ 0@
cleo_call @Noname_1573 {numParams} 1 {params} 2@ 2@
Memory.CallMethod(4509088, 12195720, 4, 0, 3@, 2@, 1@, 0@)
cleo_return 0 {retParams}

:Noname_1429
cleo_call @Noname_1470 {numParams} 1 {params} 0@ 0@
Memory.CallMethod(4509312, 12195720, 1, 0, 0@)
cleo_return 0 {retParams}

:Noname_1470
1@ = Memory.GetThisScriptStruct()
int_add 2@ = 1@ + 220
2@ = Memory.Read(2@, 1, False)
if
  2@ == 1
goto_if_false @Noname_1533
1@ = 10783072
goto @Noname_1540

:Noname_1533
1@ += 60

:Noname_1540
0@ *= 4
add_int_lvar_to_int_lvar 1@ += 0@
1@ -= 10787168
cleo_return 1 {retParams} 1@

:Noname_1573
if
  0@ == 0
goto_if_false @Noname_1598
cleo_return 1 {retParams} 0

:Noname_1598
1@ = Memory.GetThisScriptStruct()
1@ += 16
1@ = Memory.Read(1@, 4, False)
sub_int_lvar_from_int_lvar 1@ -= 0@
1@ += 3
cleo_return 1 {retParams} 1@
Object.ClearLastWeaponDamage('FREI_11')
nop
 

Вложения

  • AD.cs
    7.5 KB · Просмотры: 0