01.07.2015, 21:26
(
Последний раз редактировалось RedCode; 01.07.2015 в 23:06.
Причина: deleted
)
Deleted
if(amount < 1) return SendClientMessageEx(playerid, COLOR_GREY, " This amount isnt valid!! you scoundrel!");
CMD:getproducts(playerid, params[])
{
new string[128], amount, price;
if(sscanf(params, "d", amount)) return SendClientMessageEx(playerid, COLOR_WHITE, "Perdorimi: /getproducts [vlera]");
if(!PlayerInfo[playerid][pBusiness]) return SendClientMessage(playerid, COLOR_GREY, "You don't own a business, to /getproducts");
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1030.8898,-1451.5533,13.5546))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You are not at the products pickup to /getproducts");
return 1;
}
if ( BizInfo[PlayerInfo[playerid][pBusiness]][bSupplies] >= 500)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You have reached your Products limit of 500 Products.");
return 1;
}
price = amount * 15;
if(Products < amount) return SendClientMessageEx(playerid, COLOR_GREY, " This Products pickup doesn't have that much product!");
if(amount > 0 || amount < 999999) return SendClientMessageEx(playerid, COLOR_GREY, " FUCKING BITCH!"); // YEAH!! MAX IS : 999999
if(GetPlayerCash(playerid) > price)
{
format(string, sizeof(string), "* You bought %d products for $%d.", amount, price);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
GivePlayerCash(playerid, -price);
BizInfo[PlayerInfo[playerid][pBusiness]][bSupplies] += amount;
Products -= amount;
format(string, sizeof(string), "Packages Dropoff\n{FFFF00}/getproducts to get a product\nAvailable Products: %d/10000", Products);
UpdateDynamic3DTextLabelText(ProductsText, COLOR_RED, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " You cant afford the Products!");
return 1;
}
return 1;
}