#JOSE
Новичок
У меня такая проблема не работает команда /sellbiz
PHP:
if(strcmp(cmd, "/sellbiz", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPbiskey] == NOT_KEY)
{
SendClientMessage(playerid, COLOR_WHITE, "Âû íå âëàäååòå áèçíåñîì.");
return 1;
}
//if(PlayerInfo[playerid][pMarried] > 0)
//{
// SendClientMessage(playerid, COLOR_GREY, " Âû â áðàêå, è íå ìîæåòå ïðîäàòü Áèçíåñ!");
// return 1;
//}
if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(PlayerName(playerid), SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
{
new bouse = PlayerInfo[playerid][pPbiskey]-100;
SBizzInfo[bouse][sbOwned] = 0;
strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
//strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);
//SBizzInfo[bouse][sbTill] = 0;//íå áóäåì îáíóëÿòü ïðèáûëü
SBizzInfo[bouse][sbLocked] = 1;
SBizzInfo[bouse][sbProducts] = 100;
SBizzInfo[bouse][sbPriceProd] = 15;
new curdate = getdate();//Ïîëó÷àåò òåêóùèé äåíü â ãîäó
SBizzInfo[bouse][sbDate] = curdate;//çàïèñàòü äåíü ïîêóïêè
//SaveSBizz();
GivePlayerMoneyB(playerid, SBizzInfo[bouse][sbBuyPrice]);
PlayerInfo[playerid][pPbiskey] = NOT_KEY;
//OnPlayerStatsUpdate(playerid);
format(string, sizeof(string), "%s has sell sbiz %d for $%d", PlayerName(playerid), bouse, SBizzInfo[bouse][sbBuyPrice]);
Logs(PAY,string);
format(string,sizeof(string),"[ %s ]",SBizzInfo[bouse][sbDiscription]);
Update3DTextLabelText(text3D[MAX_HOUSE+MAX_BIZZ+bouse], 0xEEEE88FF, string);
format(string, sizeof(string), "~y~Congratulations~n~~w~You have sold your property for ~n~~g~$%d", SBizzInfo[bouse][sbBuyPrice]);
GameTextForPlayer(playerid, string, 10000, 3);
//return 1;
}
else if(strcmp(PlayerName(playerid), BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)
{
new bouse = PlayerInfo[playerid][pPbiskey];
BizzInfo[bouse][bOwned] = 0;
strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);
//strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);
BizzInfo[bouse][bEntranceCost] = 0;
//BizzInfo[bouse][bTill] = 0;//íå áóäåì îáíóëÿòü ïðèáûëü
BizzInfo[bouse][bLocked] = 1;
BizzInfo[bouse][bProducts] = 100;
BizzInfo[bouse][bPriceProd] = 15;
new curdate = getdate();//Ïîëó÷àåò òåêóùèé äåíü â ãîäó
BizzInfo[bouse][bDate] = curdate;//çàïèñàòü äåíü ïðîäàæè
//SaveBizz();
//--------------------------------------------------------------
GivePlayerMoneyB(playerid, BizzInfo[bouse][bBuyPrice]);
PlayerInfo[playerid][pPbiskey] = NOT_KEY;
//OnPlayerStatsUpdate(playerid);
format(string, sizeof(string), "%s has sell biz %d for $%d", PlayerName(playerid), bouse, BizzInfo[bouse][bBuyPrice]);
Logs(PAY,string);
format(string,sizeof(string),"[ %s ]",BizzInfo[bouse][bDiscription]);
Update3DTextLabelText(text3D[MAX_HOUSE+bouse], 0xEEEE88FF, string);
format(string, sizeof(string), "~y~Congratulations~n~~w~You have sold your property for ~n~~g~$%d", BizzInfo[bouse][bBuyPrice]);
GameTextForPlayer(playerid, string, 10000, 3);
//return 1;
}
else SendClientMessage(playerid, COLOR_WHITE, "Âû íå âëàäååòå áèçíåñîì.");
}
return 1;
}//"/sellbiz" - конец /sellbiz
