05.06.2009, 19:40
using Dcmd & Sscanf:
UNTESTED.
But something along the lines of that I guess...
pawn Код:
dcmd_BuySeed(playerid, params[])
{
new SeedType;
if(sscanf(params, "d", SeedType)) return SendClientMessage(playerid, ERROR_COLOR, "Usage: /BuySeed [Seed Number]");
else if(SeedType <=0 || SeedType >=4) return SendClientMessage(playerid, ERROR_COLOR,"Choose a valid seed number!");
else if(SeedType == 1)
{
//Do Something
}
else if(SeedType == 2)
{
//Do Something
}
else if(SeedType == 3)
{
//Do Something
}
return 1;
}
But something along the lines of that I guess...

