/buyseed [Seed]
#5

pawn Код:
dcmd_BuySeed(playerid, params[])
{
    new SeedType,SeedAmount,SeedString[50];
    if(sscanf(params, "dd", SeedType,SeedAmount)) return SendClientMessage(playerid, 0xFF000096, "* Usage: /BuySeed [Seed Number] [SeedAmount]"); SendClientMessage(playerid, 0xFF000096, "* 1- Cucumber 2- Carrot 3- Tomato");
    if(SeedType <= 0 || SeedType >= 4) return SendClientMessage(playerid, 0xFF000096,"Choose a valid seed number!");
    else if(SeedType == 1)
    {
      format(SeedString, sizeof(SeedString),"* You have bought %d Cucumber Seeds!",SeedAmount);
      SendClientMessage(playerid, 0x00FF0096, SeedString);
        SendClientMessage(playerid, 0x00FF0096, "* Remember: To plant it, you will need to have at least 5 of them.");
        FarmInfo[playerid][CucumberSeed] += SeedAmount;
    }
    else if(SeedType == 2)
    {
      format(SeedString, sizeof(SeedString),"* You have bought %d Carrot Seeds!",SeedAmount);
      SendClientMessage(playerid, 0x00FF0096, SeedString);
        SendClientMessage(playerid, 0x00FF0096, "* Remember: To plant it, you will need to have at least 5 of them.");
        FarmInfo[playerid][CarrotSeed] += SeedAmount;
    }
    else if(SeedType == 3)
    {
      format(SeedString, sizeof(SeedString),"* You have bought %d Tomato Seeds!",SeedAmount);
      SendClientMessage(playerid, 0x00FF0096, SeedString);
        SendClientMessage(playerid, 0x00FF0096, "* Remember: To plant it, you will need to have at least 5 of them.");
        FarmInfo[playerid][TomatoSeed] += SeedAmount;
    }
    return 1;
}
Forums messed up the indention.
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)