darknessmustopia
New member
Hello guys, i have this cleo and i would like to know if it can be edited to vest a certain group of people with the same name so instead of getting every nearby id i want this to only get the id's of the guys with the same name
	
	
	
		
			
			
		Code:
	
	{$CLEO}
0000: NOP
:Start
wait 100
SAMP.Available
else_jump @Start
0AF8: samp add_message_to_chat "{FFFFFF}Guardnear  -  {0085ff}[Credit: Robinson]"
:getini
0AF0: 10@ = get_int_from_ini_file "cleo\Robinson's Bindings.ini" section "GUARD" key "Key1"
0AF0: 11@ = get_int_from_ini_file "cleo\Robinson's Bindings.ini" section "GUARD" key "Key2"
:MAIN
wait 0
if and 
0AB0:  key_pressed 10@
0AB0:  key_pressed 11@
jf @MAIN
if
0AB1: call @get_id_nearest_player 0 retr_to fdist 0@ sid 1@
jf @MAIN
0AF9: "/guard %d 200" 1@
wait 1000
jump @MAIN
:get_id_nearest_player
// FOR ALL PEDS
3@ = 100.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@ 
				 
 
		 
 
		