CLEO Help [HELP] Get Player ID and then sending a command to Sa:Mp

CLEO related
Status
Not open for further replies.

Vesca

Member
Joined
May 3, 2015
Messages
9
Reaction score
0
Hello UGBase. I'm new here and I need some help, so, how can I get a player id? How can i read it. I need to do a command using CLEO Scripting like:

Instead of writing "/sellgun id m4 1", I want to write "/m4 id".
I must get the player id, and then I can use:

0AF9: samp say_msg "/sellgun %d m4 1" 1@

But how can I get the player I want to sell gun on "1@"?
 

Vesca

Member
Joined
May 3, 2015
Messages
9
Reaction score
0
springfield link said:
Code:
:cmd
0B35: 0@
0C1A: 1@ = 0@
0AF9: samp say_msg "/sellgun %d m4 1" 1@
0B43:

And the full code should be:

Code:
{$CLEO .cs}
0000: NOP
0662: "CouNT"

if
    8AF7: get_samp_base_to 33@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available

wait 0
0B34: samp register_client_command "m4" to_label @m4

:m4
0B35: 0@
0C1A: 1@ = 0@
0AF9: samp say_msg "/sellgun %d m4 1" 1@
0B43:
Samp.CmdRet()

But it crashes to me :|
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Code:
{$CLEO}
0000:

repeat
    wait 400
until 0AFA: 
0B34: "m4" @m4

while true
wait 0
end

:m4
0B35: 0@
0C1A: 1@ = 0@
0AF9: samp say_msg "/sellgun %d m4 1" 1@
0B43:
 

Vesca

Member
Joined
May 3, 2015
Messages
9
Reaction score
0
springfield link said:
Code:
{$CLEO}
0000:

repeat
    wait 400
until 0AFA: 
0B34: "m4" @m4

while true
wait 0
end

:m4
0B35: 0@
0C1A: 1@ = 0@
0AF9: samp say_msg "/sellgun %d m4 1" 1@
0B43:

It crashes my game :|
 
Status
Not open for further replies.
Top