CLEO Help source code of this

CLEO related

affar

Member
Joined
Feb 21, 2023
Messages
9
Reaction score
0
source code becuase i need to edit
 

Attachments

  • guardnear.cs
    19.2 KB · Views: 3

dphome

Well-known member
Joined
Mar 21, 2020
Messages
456
Solutions
9
Reaction score
165
Location
Poland
PHP:
{$CLEO .cs}
0000:

 
while not SAMP.Available()
    wait 400
end
0AF8: samp add_message_to_chat "Guardnear [Edited by - Liam Biggums]" color 0x3C92FF
 
while true
    wait 0
    if 0AB1: call @get_id_nearest_player 0 retr_to fdist 0@ sid 1@
    then
        if and
        0ADC: "z"
        not SAMP.ChatInputOpened()
        then
        say "/vest %d 200" 1@
    end
end
end
    
:get_id_nearest_player
// FOR ALL PEDS
3@ = 1000.0 // Max. distance
4@ = 0xFFFFFF // Nearest player handle / id
 
0A8D: 0@ = read_memory 0xB74490 size 4 virtual_protect 0
0@ += 4
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
for 1@ = 0 to 35584 step 0x100
    0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
    0@++
    if and
        2@ >= 0x00
        2@ < 0x80
    then
        005A: 2@ += 1@
        if or
            003C: $PLAYER_ACTOR == 2@ // LOCAL_PLAYER == REMOTE_PLAYER
            856D: NOT actor 2@ defined // REMOTE PLAYER IS NOT DEFINED
        then continue
        end
    
        0AB1: call @distanceBetweenActor 1 remote_player_handle 2@ retr_dist_to 5@
        if 0025: 3@ > 5@ // Max. dist > cur.
        then
            0087: 3@ = 5@ // Max. dist = cur.
            0085: 4@ = 2@ // Save remote player handle
        end
    end
end
 
if 4@ = SAMP.GetSAMPPlayerIDByActorHandle(4@)
then
    0485:  return_true
else
    059A:  return_false
end
0AB2: ret 2 3@ 4@
 
:distanceBetweenActor
Actor.StorePos(0@, 1@, 2@, 3@)
Actor.StorePos($PLAYER_ACTOR, 4@, 5@, 6@)
050A: 7@ = distance_between_XYZ 4@ 5@ 6@ and_XYZ 1@ 2@ 3@
0AB2: ret 1 7@
 

affar

Member
Joined
Feb 21, 2023
Messages
9
Reaction score
0
PHP:
{$CLEO .cs}
0000:

 
while not SAMP.Available()
    wait 400
end
0AF8: samp add_message_to_chat "Guardnear [Edited by - Liam Biggums]" color 0x3C92FF
 
while true
    wait 0
    if 0AB1: call @get_id_nearest_player 0 retr_to fdist 0@ sid 1@
    then
        if and
        0ADC: "z"
        not SAMP.ChatInputOpened()
        then
        say "/vest %d 200" 1@
    end
end
end
   
:get_id_nearest_player
// FOR ALL PEDS
3@ = 1000.0 // Max. distance
4@ = 0xFFFFFF // Nearest player handle / id
 
0A8D: 0@ = read_memory 0xB74490 size 4 virtual_protect 0
0@ += 4
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
for 1@ = 0 to 35584 step 0x100
    0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
    0@++
    if and
        2@ >= 0x00
        2@ < 0x80
    then
        005A: 2@ += 1@
        if or
            003C: $PLAYER_ACTOR == 2@ // LOCAL_PLAYER == REMOTE_PLAYER
            856D: NOT actor 2@ defined // REMOTE PLAYER IS NOT DEFINED
        then continue
        end
   
        0AB1: call @distanceBetweenActor 1 remote_player_handle 2@ retr_dist_to 5@
        if 0025: 3@ > 5@ // Max. dist > cur.
        then
            0087: 3@ = 5@ // Max. dist = cur.
            0085: 4@ = 2@ // Save remote player handle
        end
    end
end
 
if 4@ = SAMP.GetSAMPPlayerIDByActorHandle(4@)
then
    0485:  return_true
else
    059A:  return_false
end
0AB2: ret 2 3@ 4@
 
:distanceBetweenActor
Actor.StorePos(0@, 1@, 2@, 3@)
Actor.StorePos($PLAYER_ACTOR, 4@, 5@, 6@)
050A: 7@ = distance_between_XYZ 4@ 5@ 6@ and_XYZ 1@ 2@ 3@
0AB2: ret 1 7@
but when i type in sanny and compiled it is showing like this-Forbidden character in the identifier SAMP.Available.
 

affar

Member
Joined
Feb 21, 2023
Messages
9
Reaction score
0
OK THIS ONE SOLVED
but when i type in sanny and compiled it is showing like this-Forbidden character in the identifier SAMP.Available.
BUT WHAT IS THIS PROBLEM I CANT COMPILE
 

Attachments

  • Screenshot (2).png
    Screenshot (2).png
    436.4 KB · Views: 16
Top