ejexter
Well-known member
- Joined
- Feb 21, 2014
- Messages
- 211
- Reaction score
- 0
I Try to make /.spam <TEXT> <Times> :computer_guy:
And is crash me! :angry:
Somebody can explain me what i did wrong? :yesyes:
And is crash me! :angry:
Somebody can explain me what i did wrong? :yesyes:
Code:
{$CLEO .cs}
0000: NOP
0B34: samp register_client_command ".spam" to_label @start
31@ = 0 // = 0 make it not active
:main
wait 0
if
31@ == 1 //check if it is active
jf @main
for 21@ = 0 to "%d" 3@
if
0AD4: 20@ = scan_string 21@ format "%d" 3@
else_jump @USAGE
0AF9: samp say_msg "%d" 2@
if
0AD4: 18@ = scan_string 2@ format "%d" 2@
else_jump @USAGE
31@ = 0 //after you finishing your coding , make it = 0 to deactive it
SAMP.CmdRet
jump @main
:start
wait 0
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d %d" 2@ 3@
else_jump @USAGE
// here you can do more conditions like:
31@ = 1 // = 1 make it active
SAMP.CmdRet //retrieve the command line
goto @main
:USAGE
wait 0
0AF8: samp add_message_to_chat "USAGE: /.spam <Text> <Times>" color 12566463
31@ = 0 //make it false so the main label don't start
SAMP.CmdRet //retrieve the command line
goto @main