CLEO Help [HELP] Get the closest ID, and then apply a command for that ID

CLEO related
Status
Not open for further replies.

unnnameed

New member
Joined
Jun 19, 2017
Messages
1
Reaction score
0
Location
uranus
This is the code I have:​



Code:
{$CLEO .cs}
0000:
thread "mod"
0B34: samp register_client_command "ciucas" to_label @cmd
0@ = 0



:MAIN
wait 3000
IF AND
0@ == 1
056D:   actor $PLAYER_ACTOR defined 
then   
wait 0    
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
056D:   actor 31@ defined 
then
actor.StorePos($PLAYER_ACTOR, 1@ , 2@ , 3@)
actor.StorePos(31@, 4@ , 5@ , 6@)                 
IF 
7@ < 100.0  
then
0C8F: samp process_chat_input "ciuc %d" 31@
ELSE
IF 
7@ > 100.0
then 
0ACD: show_text_highpriority "Tinta este prea departe" time 5000
end
end
end
end
end
0@ == 0
END
jump @MAIN
SAMP.CmdRet()
jump @MAIN

:CMD
wait 0
if
056D: actor $PLAYER_ACTOR defined
then
0B12: 0@ = 0@ XOR 1
if
0@ == 1
then
0ACD: show_text_highpriority "ON" time 2000
else
0ACD: show_text_highpriority "OFF" time 2000
end
end
SAMP.CmdRet()
jump @MAIN


I want to type /ciucas, that command searches for the nearest player, gets his ID, and with his ID it should use /ciuc [ID] (this command trolls the player), but when I type /ciucas, its using /ciuc %d, not /ciuc [ID of the player who is closest to me].​
How can I make this get the ID of the player and automatically use the command /ciuc [on his ID]?​
 
Status
Not open for further replies.
Top