CLEO Help i didnt understood how to activate guard.cs by springfield

CLEO related
Status
Not open for further replies.

001

Active member
Joined
Jun 28, 2017
Messages
25
Reaction score
0
Code:
{$CLEO}
0000:
 
REPEAT
    WAIT 0
UNTIL 0AFA: samp.Available()
 
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 0B34: "/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@
This Code is by SpringField
Can you make it work by aiming on the player and pressing "Y"?
 
Status
Not open for further replies.
Top