15.05.2017, 14:27
Quote:
Код:
CMD:bizwithdraw(playerid, params[]) { for(new biz = 0; biz < MAX_BIZ; biz++) { if(IsPlayerInRangeOfPoint(playerid, 100, BizInfo[biz][IXCoord], BizInfo[biz][IYCoord], BizInfo[biz][IZCoord])) { if(GetPlayerVirtualWorld(playerid) == BizInfo[biz][VW]) { if(strcmp(BizInfo[biz][Owner], GetPlayerNameEx(playerid), true)) == 0) { new money; if(sscanf(params,"d", money)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizwithdraw [amount]"); if(money > BizInfo[biz][Till]) return SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much money in your Till!"); new string[150]; format(string,sizeof(string),"You've taken $%d out of your Business Till.", money); SendClientMessage(playerid, COLOR_GREY, string); GivePlayerCash(playerid, money); BizInfo[biz][Till] -= money; } else { SendClientMessage(playerid, COLOR_GRAD2, "You're not in your bussiness."); } } } } return 1; } |