14.07.2013, 02:32
Like this ?
Код:
CMD:buyseeds(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == 3 /*Or REDNECKS*/ || PlayerInfo[playerid][pJob] == DRUGDEALER) { if(!PlayerToPoint(3.0, playerid, -392.1880,-1439.1407,26.3389)) return SCM(playerid, COLOR_GREY, "You are not at the drug farm."); if(sscanf(params,"d",amount)) return SyntaxMSG(playerid, "/buyseeds [amount] (Each seed costs $200)"); if(amount < 1) return SCM(playerid, COLOR_GREY, "Invalid amount."); new price = amount * 200; if(GetCash(playerid) < price) return SCMEx(playerid, COLOR_GREY, "[ERROR]: %d seeds price is %d.", amount, price); SCMEx(playerid, COLOR_FADE2, "{C0C0C0}You have successfully bought {FFFFFF}%d {C0C0C0}seeds, you may plant these seeds.", amount); SCM(playerid, COLOR_LIGHTRED, "[ATTENTION]: Planting these seeds in public places will get you banned."); GiveCash(playerid, -price); PlayerInfo[playerid][pSeeds] += amount; return 1; } else { (playerid, COLOR_LIGHTRED, "You are not a drug dealer."); }