/buyseed [Seed]
#3

using strtok:
pawn Код:
if(strcmp(cmd,"/Buyseed",true)==0)
  {
    SendClientMessage(playerid,0x00FF00AA,"You need to choose which seed to buy! Choose: /Buy Seed (Seed Number)");
    SendClientMessage(playerid,0x00FF00AA,"Seed Types: 1- Cucumber, 2- Carrot, 3- Tomatoes");
    tmp=strtok(cmdtext,idx);
    if(strcmp(tmp,"1",true)==0)
    {
      SendClientMessage(playerid,0x00FF00AA,"You have bought Cucumber seeds!");
    }
    if(strcmp(tmp,"2",true)==0)
    {
      SendClientMessage(playerid,0x00FF00AA,"You have bought Carrot seeds!");
    }
    if(strcmp(tmp,"3",true)==0)
    {
      SendClientMessage(playerid,0x00FF00AA,"You have bought Tomatoes seeds!");
    }
    return 1;
  }
Reply


Messages In This Thread
/buyseed [Seed] - by Koppa, - 05.06.2009, 17:50
Re: /buyseed [Seed] - by miokie - 05.06.2009, 19:40
Re: /buyseed [Seed] - by Badger(new) - 05.06.2009, 21:36
Re: /buyseed [Seed] - by Koppa, - 06.06.2009, 15:34
Re: /buyseed [Seed] - by miokie - 06.06.2009, 15:44
Re: /buyseed [Seed] - by Koppa, - 06.06.2009, 16:21
Re: /buyseed [Seed] - by miokie - 06.06.2009, 16:30
Re: /buyseed [Seed] - by Koppa, - 06.06.2009, 16:35
Re: /buyseed [Seed] - by miokie - 06.06.2009, 17:20
Re: /buyseed [Seed] - by Koppa, - 06.06.2009, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)