CLEO Help could not find get_cp

CLEO related
Status
Not open for further replies.

FetterTyp

Member
Joined
Sep 9, 2017
Messages
8
Reaction score
0
Idk why but i cant compile this script:


Code:
{$CLEO .cs}
0000:


REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY



WHILE TRUE
    WAIT 0
    IF
    00DF:   actor $PLAYER_ACTOR driving
    THEN
        03C0: 0@ = actor $PLAYER_ACTOR car
        IF
        0AB1: @is_cp_active 0 // are we in a checkpoint?
        THEN
            0AB1: @get_cp 0 1@ 2@ 3@ // get checkpoint pos
            0407: store_coords_to 4@ 5@ 6@ from_car 0@ with_offset 0.0 0.0 0.0
            050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@
            IF
            7@ < 4.0 // Radius of Checkpoint, if its smaller then 4 then Stop car
            THEN
                33@ = 0 // reset timer, increases +1 each millisecond
                repeat
                wait 0
                IF
                80DF:   actor $PLAYER_ACTOR driving
                THEN
                    BREAK                
                END
                04BA: set_car 0@ speed_to 0.0 // stop car
                until 33@ > 15000
                REPEAT
                wait 0
                IF
                80DF:   actor $PLAYER_ACTOR driving
                THEN
                    BREAK                
                END
                0407: store_coords_to 4@ 5@ 6@ from_car 0@ with_offset 0.0 0.0 0.0
                050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@                
                UNTIL 7@ > 4.0 // If is out of the checkpoint...
                wait 3000
                


            END
        END
    END
END


when i compile it says (could not find get_cp) i already added sf opcodes but it still not working can anyone compile this for me or help me to fix this error?
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
{$CLEO .cs}
0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

33@ = 0

WHILE TRUE
   WAIT 0
   
   IF
   00DF:   actor $PLAYER_ACTOR driving
   THEN
       03C0: 0@ = actor $PLAYER_ACTOR car
       IF
       0AB1: @is_cp_active 0 // are we in a checkpoint?
       THEN
           0AB1: @get_cp_pos 0 1@ 2@ 3@ // get checkpoint pos
           00AA: store_car 0@ position_to 4@ 5@ 6@
           050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@
           IF
           7@ < 4.0 // Radius of Checkpoint, if its smaller then 4 then Stop car
           THEN
               33@ = 0 // reset timer, increases +1 each millisecond
               repeat
               wait 0
               IF
               80DF:   actor $PLAYER_ACTOR driving
               THEN
                   BREAK                
               END
               04BA: set_car 0@ speed_to 0.0 // stop car
               until 33@ > 15000
               REPEAT
               wait 0
               IF
               80DF:   actor $PLAYER_ACTOR driving
               THEN
                   BREAK                
               END
               00AA: store_car 0@ position_to 4@ 5@ 6@
               050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@                
               UNTIL 7@ > 4.0 // If is out of the checkpoint...
               wait 3000
               


           END
       END
   END
   
END

:is_cp_active
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 0

:get_cp_pos
0AA2: 0@ = loadlib "samp.dll"
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@
0AB2: ret 3 2@ 3@ 4@
 
Status
Not open for further replies.
Top