Two commands doing the same thing
#1

Is there a way for like two commands to do the same thing without having to copy and paste the whole code twice?

For example, I want /a and /b to do the samething, but not have to do

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/a", true) == 0)
  {
   // CODE
   return 1;
  }
  if(strcmp(cmdtext, "/b", true) == 0)
  {
   // SAME CODE
   return 1;
  }
  return 0;
}
Reply


Messages In This Thread
Two commands doing the same thing - by ilikepie2221 - 22.08.2009, 21:39
Re: Two commands doing the same thing - by ronyx69 - 22.08.2009, 21:40
Re: Two commands doing the same thing - by ilikepie2221 - 22.08.2009, 21:46
Re: Two commands doing the same thing - by snoob - 22.08.2009, 21:47
Re: Two commands doing the same thing - by Memoryz - 22.08.2009, 21:47
Re: Two commands doing the same thing - by ronyx69 - 22.08.2009, 21:49
Re: Two commands doing the same thing - by ilikepie2221 - 22.08.2009, 21:52

Forum Jump:


Users browsing this thread: 1 Guest(s)