Code:
{$CLEO}
0000:
alloc 31@ 200
REPEAT
WAIT 0
UNTIL 0AFA:
0B34: samp register_client_command "killc" to_label @cmd_mycmd
0@ == TRUE
WHILE TRUE
WAIT 0
IF
056D: actor $PLAYER_ACTOR defined
0B61: samp is_local_player_spawned
CALL @GetClosestPed 0 2@
IF 056D: actor 2@ defined
THEN
wait 1000
say "/re"
END
END
:GetClosestPed
var
0@ : float
5@ : float
end
0@ = 10.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@
:cmd_mycmd
004E: end_thread
SAMP.CmdRet()
I have one problem with this. The problem is the cleo detect even the NPC as a player. Can someone please make this to detect only real players? please