zaketej
Member
Code:
{$CLEO}
0000: NOP
while not SAMP.Available()
wait 400
end
while true
wait 0
if and
0AB0: is_key_pressed 17 //ctrl
0AB0: is_key_pressed 87 //w
then
if
call @is_cp_active 0
then
call @get_cp_pos 0 X 1@ Y 2@ Z 3@
0603: task_go_to_coord_any_means $PLAYER_ACTOR coord 1@ 2@ 3@ walk_speed 7 car -1
wait 2000
end
end
end
//Credits to Springfield and 0B36 for the 2 scm funcs
//http://ugbase.eu/index.php?threads/snippet-sa-mp-checkpoints.10260/post-72843
: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@
how could I add loop to this script?
This script is made by @ItsRobinson