08.02.2014, 20:00
(
Последний раз редактировалось DaniceMcHarley; 01.06.2017 в 02:48.
)
------
if(strcmp(x_op,"withdraw",true) == 0)
{
for(new b = 1; b < sizeof(BusinessInfo); b++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ] && BusinessInfo[b][bOwned] == 1 && strcmp(BusinessInfo[b][bOwner], sendername(playerid), false))
{
MSG(playerid,RED,"[ERROR] You don't own this business.");
else
{
new string[100],amount;
if(sscanf(params,"i",amount)) return MSG(playerid,GRAD,"/vault withdraw [Amount]");
if(BusinessInfo[b][bMoney] >= amount)
{
GivePlayerMoney(playerid,amount);
BusinessInfo[b][bMoney] -= amount;
format(string, sizeof(string), "[INFO]{FFFFFF}: You have successfully taken $%d from your vault.", amount);
SendClientMessage(playerid,GRAD, string);
return 1;
}