Author Topic: serverCmd help[Solved]  (Read 1957 times)

The admin password one
But I do believe you can't open it with commandtoclient('whatever');

Any way you know of to open it?

Any way you know of to open it?
No server-sided one sorry

You would catch it's input by packaging servercmdsad(%cl, %stuff)

No server-sided one sorry

You would catch it's input by packaging servercmdsad(%cl, %stuff)
Dang, well maybe I'll just use strReplace and use _'s to separate the words.

what's wrong with a bunch of arguments in the function?

what's wrong with a bunch of arguments in the function?

For things with a lot of words


what?
Apparantly he needs it to work with more than 16 words (which is ridiculous).

you could do something like this
Code: [Select]
package someCommand{
     function serverCmdMessageSent(%cl, %msg){
          if(!getWord(%msg, "!command")){
               %args = strReplace(%msg, "!command", "");
               //args is all of the text after !command and %cl is the client, do whatever you need to here
               return;
          }
          parent::serverCmdMessageSent(%cl, %msg);
     }
};
« Last Edit: October 06, 2012, 04:21:33 PM by Scars75 »

That is a horrible way of doing it, use restWords.

That is a horrible way of doing it, use restWords.
didn't know that existed, it doesn't make much of a difference though except that I forgot to trim
« Last Edit: October 06, 2012, 04:34:31 PM by Scars75 »

didn't know that existed, it doesn't make much of a difference though except that I forgot to trim
Yes it does, what if the thing I want to do is
!command setcmdname !command

Yes it does, what if the thing I want to do is
!command setcmdname !command
oh ok I get the usage now

It might be worth looking into that one mod M did where if you put stuff in quotes it will become a single argument
Umm didn't Clockturn make that?

Umm didn't Clockturn make that?
Umm isn't that easy to make?

If possible can someone give me a link to the reference and or a keyword to start searching?