Hello, I took this cleo and changed it to go to the checkpoint but it has an error that sometimes goes crazy and starts to crash some solution?
@Parazitas
Code:
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA:
WHILE TRUE
WAIT 0
IF
00DF: actor $PLAYER_ACTOR driving // i'm driving
THEN
IF
call @is_cp_active 0
THEN
call @get_cp_pos 0 X 1@ Y 2@ Z 3@ // get the coords
03C0: 4@ = actor $PLAYER_ACTOR car
00AE: set_car 4@ traffic_behaviour_to 2 // AVOID CARS
0423: set_car 4@ improved_handling_to 2.0
00AD: set_car 4@ max_speed_to 76.0
02C2: car 4@ drive_to 1@ 2@ 3@
IF
00EE: actor $PLAYER_ACTOR sphere 0 near_point 1@ 2@ 3@ radius 1.0 1.0 in_car // radius you must do tests and change by yourself
THEN
0@ = TRUE // DISABLE CP CHECKING , ENABLE TIME CHECKER , ETC..
072A: put_actor $PLAYER_ACTOR into_car 4@ driverseat // DISABLE DRIVING
32@ = 0 // reset timer , make sure it starts count only from now
END
END
END
IF AND
0@ == TRUE // timer enabled
32@ > 3000 // 3sec
THEN // you was stopped and 3sec passed.., he can start drive to next checkpoint.
32@ = 0 // reset timer
0@ = FALSE // ENABLE CP CHECK CHECKING , ETC...
END
END
:is_cp_active
if 0AA2: 0@ = loadlib "samp.dll"
then 0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x24
0A8D: 1@ = readMem 1@ sz 4 vp 0
if 1@ == true
then 0485: return_true
else 059A: return_false
end
0AA3: freelib 0@
end
0AB2: ret 0
:get_cp_pos
if 0AA2: 0@ = loadlib "samp.dll"
then 0A8E: 1@ = 0@ + 0x21A10C
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0xC
0A8D: 2@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 3@ = readMem 1@ sz 4 vp 0
1@ += 0x4
0A8D: 4@ = readMem 1@ sz 4 vp 0
0AA3: freelib 0@
end
0AB2: ret 3 2@ 3@ 4@
Last edited: