CLEO Help Help!! CLEO hack in SA-MP

CLEO related
Status
Not open for further replies.

ackerman101101

New member
Joined
Jan 18, 2017
Messages
3
Reaction score
0
Hello everyone.

I just started to learn about CLEO scripting yesterday and I have a problem that I can't find any tutorial about scripting a CLEO hack SA-MP for beginners. If anyone want to help please show me what opcode to check a command in SA-MP like check if player pressed a button. Thanks for reading this.  :LOL:
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
This?

Code:
if 0AB0:   key_pressed 114 //F3
then
//stuff
end

For more keys : https://www.indigorose.com/webhelp/ams50/Program_Reference/Misc/Virtual_Key_Codes.htm
 

ackerman101101

New member
Joined
Jan 18, 2017
Messages
3
Reaction score
0
yes but that is checking player pressed key, what I'm trying to do is checking the command that player typed in SA-MP like

someone go to a roleplay server press T and type /givegun

if ####: cmd:givegun
then
//stuff
end

something like that ~~
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
So your ingame command will be /ur_cmd and its code will be located inside of _label_1

Code:
//some ini stuff
0B34: samp register_client_command "ur_cmd" to_label @_label_1

//your infinite cycle code

:_label_1
//stuff
SAMP.CmdRet()
 

ackerman101101

New member
Joined
Jan 18, 2017
Messages
3
Reaction score
0
Ohh thank you.

Code:
{$CLEO .cs}

0000: NOP

thread "Ackerman"

0B34: samp register_client_command "bungxungua" to_label @Akerman1

:Ackerman1
wait 0
//stuff
SAMP.CmdRet()

Is this OK? I'm trying to make a command that if player use it, then it will show on the chatbox a message with color for few player in a small area to see it. Can you please show me how?  :eek:stopitu:
 

RyanCollier

Active member
Joined
Jul 30, 2016
Messages
109
Reaction score
1
ackerman101101 said:
Ohh thank you.

Code:
{$CLEO .cs}

0000: NOP

thread "Ackerman"

0B34: samp register_client_command "bungxungua" to_label @Akerman1

:Ackerman1
wait 0
//stuff
SAMP.CmdRet()

Is this OK? I'm trying to make a command that if player use it, then it will show on the chatbox a message with color for few player in a small area to see it. Can you please show me how?  :eek:stopitu:
Kind of server-sided command like /dice ?
 
Status
Not open for further replies.
Top