Command Question
#4

example:

pawn Код:
if(!strcmp(cmdtext, "/buyfood", true))
{
   new food[128];
   format(food, 128, "%s", cmdtext[9]);
   if(cmdtext[9] == 32 && cmdtext[8] != EOS)
     return SendClientMessage(playerid, 0xFF0000AA, "USAGE: \"/buyfood [food-name]\"");
   if(!strcmp(food, "hamburger and fries", true))
   {
      //Stuff
   }
   //more statements if you want, which you probally do.
   return true;
}
Reply


Messages In This Thread
Command Question - by Zeromanster - 17.11.2009, 15:43
Re: Command Question - by darkrider366 - 17.11.2009, 17:02
Re: Command Question - by (Jeff) - 17.11.2009, 17:04
Re: Command Question - by LarzI - 17.11.2009, 17:25
Re: Command Question - by Zeromanster - 17.11.2009, 22:18
Re: Command Question - by LarzI - 18.11.2009, 05:30

Forum Jump:


Users browsing this thread: 2 Guest(s)