- Регистрация
- 22 Янв 2018
- Сообщения
- 190
- Лучшие ответы
- 0
- Репутация
- 1
Всем привет! А как сделать, чтобы бизнес можно было продавать в гос.стоимость или игроку?
Вот команда для продажи в гос:
Вот команда для продажи в гос:
PHP:
CMD:sellbiz(playerid)
{
if(!IsPlayerConnected(playerid)) return true;
if(!BGet(playerid)) return SendClientMessage(playerid, COLOR_GREY, "У Вас нет бизнеса!");
if(strcmp(User[playerid][pName], BizzInfo[GetPVarInt(playerid,"Bizz")][bOwner], true) == 0)
{
new str[40];
new bouse = GetPVarInt(playerid,"Bizz");
if (!PlayerToPoint(3, playerid,BizzInfo[bouse][bEntranceX], BizzInfo[bouse][bEntranceY], BizzInfo[bouse][bEntranceZ])) return SendClientMessage(playerid, COLOR_GREY, "Вы не у своего бизнеса!");
BizzInfo[bouse][bLocked] = 1;
BizzInfo[bouse][bProducts] = 0;
strmid(BizzInfo[bouse][bOwner], "None", 0, strlen("None"), 32);
User[playerid][pBank] +=BizzInfo[bouse][bBuyPrice];
format(str,sizeof(str),"~w~business in sold~n~~g~%i$",BizzInfo[bouse][bBuyPrice]);
GameTextForPlayer(playerid,str, 5000, 3);
BizzInfo[bouse][bTill] = 0;
BizzInfo[bouse][bPrice] = 0;
BizzInfo[bouse][bMafia] = 0;
BizzInfo[bouse][bLandTax] = 0;
BizzPay[bouse] = 0;
BizzInfo[bouse][bLicense] = 0;
BGet(playerid);
format(YCMDstr, sizeof(YCMDstr), "{76A44B}Бизнес: {FEE600}""%s""\n{76A44B}Продаётся", BizzInfo[bouse][bMessage],BizzInfo[bouse][bBuyPrice]);
UpdateDynamic3DTextLabelText(BizzInfo[bouse][bLabel], COLOR_GREEN, YCMDstr);
return true;
}
return true;
}