Blockland Forums > Modification Help
Coding questions V2
<< < (2/2)
Crysist:

--- Quote from: spartan101 on July 12, 2010, 08:32:53 PM ---Dunno,I suck at it myself

--- End quote ---
Then why post? Also I'm posting to point out that his post was unneeded.
Red_Guy:

--- Quote from: heedicalking on July 12, 2010, 08:10:08 AM ---Another problem I had was servercmds not supporting easy word manipulation. I want to make a command such as /createteam cool club, it would only make the team named cool.

I want it so you do function servercmdCreateteam(%client, %name1, %name2) and it keeps spaces and creates a new string called %name3 by combining name 1 and 2.

--- End quote ---

your going to want something like this:

--- Code: ---function serverCmdCreateteam(%client, %name1, %name2, %name3 )
  {
    %teamName = %name1;
    if (%name2 !$= "")
      %teamName = %teamName SPC %name2;
    if (%name3 !$= "")
      %teamName = %teamName SPC %name3;

.... stuff to actually create the team goes here...

   }

--- End code ---
spartan101:

--- Quote from: Red_Guy on July 13, 2010, 03:58:01 PM ---your going to want something like this:

--- Code: ---function serverCmdCreateteam(%client, %name1, %name2, %name3 )
  {
    %teamName = %name1;
    if (%name2 !$= "")
      %teamName = %teamName SPC %name2;
    if (%name3 !$= "")
      %teamName = %teamName SPC %name3;

.... stuff to actually create the team goes here...

   }

--- End code ---


--- End quote ---
:cookieMonster:
Navigation
Message Index
Previous page

Go to full version