CLEO Help HOW DO I SCRIPT commands (very simple cmd to display text)

CLEO related
Status
Not open for further replies.

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
1
I tried!

It doesn't work:

Code:
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
thread "SUGAR" 
wait 3000
0B34: samp register_client_command "manims" to_label @UGBASE_60 
0B34: samp register_client_command "mbibi" to_label @UGBASE_102 

:UGBASE_49
wait 0 
goto @UGBASE_49 

:UGBASE_60
   SAMP.IsCommandTyped(5@)
if 
0AD4: 5@ = scan_string 5@ format "%d" 7@  
jf @UGBASE_100 
0AF8: samp add_message_to_chat "Hey! Test!" color 12451840 

:UGBASE_100
SAMP.CmdRet

:UGBASE_102
   SAMP.IsCommandTyped(5@)
if 
0AD4: 5@ = scan_string 5@ format "%d" 7@  
jf @UGBASE_142 
0AF8: samp add_message_to_chat "Hey! Test!" color 12451840 

:UGBASE_142
SAMP.CmdRet

It does not display "Hey! Test!" when I type it!
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
You'd need to type /manims 1337 or /mbibi 1337
If you want it to say the text when you call the command just remove the 0AD4 check.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
52
Location
LongForgotten <-> 0x32789
You have added the decimal(a.k.a integer or number) check,  Unless you type a number or a proper integer which is not above 9999999999 will work, If you remove the check then it will work without needing of an ID and using that check the script finds the params and that can be used to make a vehicle with a model id, or playerid wutever
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
That's one ugly fucking mess you made there.

Here's the clean code

Code:
{$CLEO}

thread "SUGAR" 

repeat
wait 0
until samp.Available()

0B34: "manims" @manims 
0B34: "mbibi" @mbibi 

while true
wait 0
end

:manims
wait 0 
0AF8: "Hey! Test!" 12451840 
SAMP.CmdRet

:mbibi
wait 0
0AF8: "Hey! Test!" 12451840 
SAMP.CmdRet
 
Status
Not open for further replies.
Top