Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Help помогите /sellbiz

Статус
В этой теме нельзя размещать новые ответы.

Domenik12

Новичок
при продаже бизнеса пишет unkown command

PHP:
	else if(strcmp(cmd, "/sellbiz", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			new playername[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername, sizeof(playername));
			if(PlayerInfo[playerid][pPbiskey] == 255 && PlayerInfo[playerid][pPsbiskey] == 255) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[Ошибка]:{FFFFFF} Вы не владеете бизнесом!");
			if(strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPsbiskey]][sbOwner], true) == 0)
			{
				new bouse = PlayerInfo[playerid][pPsbiskey];
				if (!PlayerToPoint(3, playerid,SBizzInfo[bouse][sbEntranceX], SBizzInfo[bouse][sbEntranceY], SBizzInfo[bouse][sbEntranceZ])) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[Ошибка]:{FFFFFF} Вы не у своего бизнеса!");
				PlayerInfo[playerid][pBank] +=SBizzInfo[bouse][sbTill];
				SBizzInfo[bouse][sbLocked] = 1;
				SBizzInfo[bouse][sbOwned] = 0;
				SBizzInfo[bouse][sbPriceProd] = 0;
				SBizzInfo[bouse][sbProducts] = 0;
				GetPlayerName(playerid, sendername, sizeof(sendername));
				strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
				//
				SendClientMessage(playerid, COLOR_YELLOW, "Ваш бизнес успешно продан!");
				format(string, sizeof(string), "Прибыль с продажи бизнеса: {FFFF00}%d {FFFFFF}вирт", SBizzInfo[bouse][sbTill]);
				SendClientMessage(playerid, COLOR_WHITE, string);
				format(string, sizeof(string), "Новый счёт в банке: {FFFF00}%d{FFFFFF} вирт", PlayerInfo[playerid][pBank]);
				SendClientMessage(playerid, COLOR_WHITE, string);
				SendClientMessage(playerid, COLOR_YELLOW, "Ваш бизнес успешно продан!");
				SBizzInfo[bouse][sbTill] = 0;
				PlayerInfo[playerid][pPsbiskey] = 255;
				format(string, sizeof(string), "{FFFF00}Цена: {FFFFFF}%d\n{FFFF00}Бизнес продаётся",SBizzInfo[bouse][sbBuyPrice]);
				Update3DTextLabelText(SBizzInfo[bouse][sbLabel], COLOR_YELLOW, string);
				OnPropUpdate();
				OnPlayerUpdateRL(playerid);
				return true;
			}
			if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)
			{
				new bouse = PlayerInfo[playerid][pPbiskey];
				if (!PlayerToPoint(3, playerid,BizzInfo[bouse][bEntranceX], BizzInfo[bouse][bEntranceY], BizzInfo[bouse][bEntranceZ])) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[Ошибка]:{FFFFFF} Вы не у своего бизнеса!");
				BizzInfo[bouse][bLocked] = 1;
				BizzInfo[bouse][bOwned] = 0;
				BizzInfo[bouse][bProducts] = 0;
				GetPlayerName(playerid, sendername, sizeof(sendername));
				strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);
				strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);
				PlayerInfo[playerid][pBank] +=BizzInfo[bouse][bTill] / 2;
				PlayerInfo[playerid][pBank] +=BizzInfo[bouse][b2Till];
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				SendClientMessage(playerid, COLOR_YELLOW, "Ваш бизнес успешно продан!");
				format(string, sizeof(string), "Прибыль с продажи бизнеса: {FFFF00}%d{FFFFFF} вирт", BizzInfo[bouse][bTill]);
				SendClientMessage(playerid, COLOR_WHITE, string);
				format(string, sizeof(string), "Новый счёт в банке: {FFFF00}%d{FFFFFF} вирт", PlayerInfo[playerid][pBank]);
				SendClientMessage(playerid, COLOR_WHITE, string);
				SendClientMessage(playerid, COLOR_YELLOW, "Ваш бизнес успешно продан!");
				BizzInfo[bouse][bTill] = 0;
				BizzInfo[bouse][b2Till] = 0;
				PlayerInfo[playerid][pPbiskey] = 255;
				format(string, sizeof(string), "{FFFF00}Цена: {FFFFFF}%d{FFFF00}\nБизнес продаётся",BizzInfo[bouse][bBuyPrice]);
				Update3DTextLabelText(BizzInfo[bouse][bLabel], COLOR_YELLOW, string);
				OnPropUpdate();
				OnPlayerUpdateRL(playerid);
				return true;
			}
			else { SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[Ошибка]:{FFFFFF} У вас нет бизнеса!"); }
		}
		return true;
	}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу