Need help with command
#9

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.");
}
Reply


Messages In This Thread
Need help with command - by showarn - 13.07.2013, 22:46
Re: Need help with command - by IceCube! - 13.07.2013, 22:49
Re: Need help with command - by lider1241 - 13.07.2013, 22:49
Re: Need help with command - by showarn - 13.07.2013, 22:51
Re: Need help with command - by IceCube! - 13.07.2013, 22:52
Re: Need help with command - by showarn - 13.07.2013, 22:55
Re: Need help with command - by showarn - 13.07.2013, 23:23
AW: Need help with command - by Macronix - 14.07.2013, 00:12
Re: Need help with command - by showarn - 14.07.2013, 02:32

Forum Jump:


Users browsing this thread: 1 Guest(s)