CLEO Help compile error again

CLEO related
Status
Not open for further replies.

maximko

Well-known member
Joined
Apr 16, 2014
Messages
394
Reaction score
1
Location
Russia
when i compile it, it says unknown directive samp.Available()

Code:
{$CLEO}
0000:
while not samp.Available()
    wait 100
end
2@ = #WMYDRUG

while true
wait 0
if and
0AB0: key_pressed 114
056D: actor $PLAYER_ACTOR defined
0B61: samp is_local_player_spawned
then
    0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to $NOT_USED closest_ped_to 1@
    if and 
    not 1@ == -1
    056D: actor 1@ defined
    02F2: actor 1@ model == 2@
    then
        3@ = SAMP.GetSAMPPlayerIDByActorHandle(1@)
        say "/guard %i 200" 3@
    end
end
end
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Use CLEO 4.1 for 0AB5 to work.

[shcode=cpp]
{$CLEO}
0000:

REPEAT
    WAIT 0
UNTIL 0AFA:

WHILE TRUE
WAIT 0
    IF AND
        0AB0: 2
        056D: actor $PLAYER_ACTOR defined
        0B61: samp is_local_player_spawned
    THEN
        CALL @GetClosestPed 0 2@       
        IF 056D: actor 2@ defined
        THEN
            IF 0B2B: samp 3@ = get_player_id_by_actor_handle 2@
            THEN say"/guard %i 200" 3@ 
            END
        END
    END
END


:GetClosestPed
var
0@ : float
5@ : float
end
0@ = 600.0
1@ = -1

00A0: $PLAYER_ACTOR 2@ 3@ 4@

0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
    0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
    000A: 29@ += 0x1
    if and
        0029:  31@ >= 0x00 
        001B:  0x80 > 31@
    then 
        005A: 31@ += 30@
        
        if 003B: 31@ == $PLAYER_ACTOR
        then continue
        end
        
        00A0: 31@ 6@ 7@ 8@
        0509: 5@ = distance_between_XY 2@ 3@ 6@ 7@

        if 5@ < 0@
        then
            0087: 0@ = 5@
            0085: 1@ = 31@
        end
    end
end

0AB2: ret 1 1@
[/shcode]
 
Status
Not open for further replies.
Top