PHP код:
case 2289:
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new h = 0; h < sizeof(BizzInfo); h++)
{
new cena = BizzInfo[h][bPrice];
new cena2 = BizzInfo[h][bPrice] *2;
new cena3 = BizzInfo[h][bPrice] *3;
new cena4 = BizzInfo[h][bPrice] *4;
new cena5 = BizzInfo[h][bPrice] *5;
new cena6 = BizzInfo[h][bPrice] *6;
if(response)
{
new
Float: x,
Float: y,
Float: z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x - 2.0, y - 2.0, z); // Варнинг этой строки,я его исправил
if(listitem == 0) // Та самая строка 12446// Варнинг этой строки не получается исправить
{
new Float:health;
GetPlayerHealth(playerid,health);
if (PlayerToPoint(3, playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
{
if(BizzInfo[h][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "? ???? ??? ????????");
if(PlayerInfo[playerid][pCash] < cena) return SendClientMessage(playerid, COLOR_GREY, "? ??? ??? ??????? ?????");
PlayerInfo[playerid][pSatiety] += 30;
BizzInfo[h][b2Till] += cena;
BizzInfo[h][bProducts]-= 2;
PlayerInfo[playerid][pCash] -= cena;
if(PlayerInfo[playerid][pSatiety] > 100)
{
PlayerInfo[playerid][pSatiety] = 100;
}
format(string,128, "«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
SendClientMessage(playerid,COLOR_WHITE,string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string), "?????(?) ????");
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
ApplyAnimation(playerid, "BAR", "dnk_stndF_loop",4.1,0,0,0,0,0,1);
return true;
}
}
else if(listitem == 1)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(PlayerToPoint(3, playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
{
if(BizzInfo[h][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "? ???? ??? ????????");
if(PlayerInfo[playerid][pCash] < cena2) return SendClientMessage(playerid, COLOR_GREY, "? ??? ??? ??????? ?????");
PlayerInfo[playerid][pSatiety] += 40;
BizzInfo[h][b2Till] += cena2;
BizzInfo[h][bProducts]-= 2;
PlayerInfo[playerid][pCash] -= cena2;
if(PlayerInfo[playerid][pSatiety] > 100)
{
PlayerInfo[playerid][pSatiety] = 100;
}
format(string,128, "«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
SendClientMessage(playerid,COLOR_WHITE,string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string), "?????(?) ????");
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
ApplyAnimation(playerid, "BAR", "dnk_stndF_loop",4.1,0,0,0,0,0,1);
return true;
}
}
else if(listitem == 2)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(PlayerToPoint(3, playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
{
if(BizzInfo[h][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "? ???? ??? ????????");
if(PlayerInfo[playerid][pCash] < cena3) return SendClientMessage(playerid, COLOR_GREY, "? ??? ??? ??????? ?????");
BizzInfo[h][b2Till] += cena3;
PlayerInfo[playerid][pSatiety] += 50;
BizzInfo[h][bProducts]-= 2;
PlayerInfo[playerid][pCash] -= cena3;
if(PlayerInfo[playerid][pSatiety] > 100)
{
PlayerInfo[playerid][pSatiety] = 100;
}
format(string,128, "«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
SendClientMessage(playerid,COLOR_WHITE,string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string), "?????(?) ???? - ????",sendername);
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
ApplyAnimation(playerid, "BAR", "dnk_stndF_loop",4.1,0,0,0,0,0,1);
return true;
}
}
else if(listitem == 3)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(PlayerToPoint(3, playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
{
if(BizzInfo[h][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "? ???? ??? ????????");
if(PlayerInfo[playerid][pCash] < cena4) return SendClientMessage(playerid, COLOR_GREY, "? ??? ??? ??????? ?????");
PlayerDrunk[playerid] += 2;
if(GetPlayerHealth(playerid, health) < 100)
{
if(GetPlayerDrunkLevel(playerid) < 20000)
{
SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
}
}
PlayerInfo[playerid][pSatiety] += 60;
BizzInfo[h][b2Till] += cena4;
BizzInfo[h][bProducts] -= 2;
PlayerInfo[playerid][pCash] -= cena4;
if(PlayerInfo[playerid][pSatiety] > 100)
{
PlayerInfo[playerid][pSatiety] = 100;
}
format(string,128, "«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
SendClientMessage(playerid,COLOR_WHITE,string);
format(string,sizeof(string), "?????(?) ??????? ????",sendername);
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
ApplyAnimation(playerid, "BAR", "dnk_stndF_loop",4.1,0,0,0,0,0,1);
return true;
}
}
else if(listitem == 4)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(PlayerToPoint(3, playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
{
if(BizzInfo[h][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "? ???? ??? ????????");
if(PlayerInfo[playerid][pCash] < cena5) return SendClientMessage(playerid, COLOR_GREY, "? ??? ??? ??????? ?????");
PlayerDrunk[playerid] += 2;
if(GetPlayerHealth(playerid, health) < 100)
{
if(GetPlayerDrunkLevel(playerid) < 20000)
{
SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
}
}
PlayerInfo[playerid][pSatiety] += 70;
BizzInfo[h][b2Till] += cena5;
BizzInfo[h][bProducts] -= 2;
PlayerInfo[playerid][pCash] -= cena5;
if(PlayerInfo[playerid][pSatiety] > 100)
{
PlayerInfo[playerid][pSatiety] = 100;
}
format(string,128, "«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
SendClientMessage(playerid,COLOR_WHITE,string);
format(string,sizeof(string), "?????(?) ????? ????",sendername);
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
ApplyAnimation(playerid, "BAR", "dnk_stndF_loop",4.1,0,0,0,0,0,1);
return true;
}
}
else if(listitem == 5)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(PlayerToPoint(3, playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
{
if(BizzInfo[h][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "? ???? ??? ????????");
if(PlayerInfo[playerid][pCash] < cena6) return SendClientMessage(playerid, COLOR_GREY, "? ??? ??? ??????? ?????");
PlayerDrunk[playerid] += 2;
if(GetPlayerHealth(playerid, health) < 100)
{
if(GetPlayerDrunkLevel(playerid) < 20000)
{
SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
}
}
BizzInfo[h][b2Till] += cena6;
PlayerInfo[playerid][pSatiety] += 80;
BizzInfo[h][bProducts] -= 2;
PlayerInfo[playerid][pCash] -= cena6;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pSatiety] > 100)
{
PlayerInfo[playerid][pSatiety] = 100;
}
format(string,128, "«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
SendClientMessage(playerid,COLOR_WHITE,string);
format(string,sizeof(string), "?????(?) ??????",sendername);
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
ApplyAnimation(playerid, "BAR", "dnk_stndF_loop",4.1,0,0,0,0,0,1);
return true;
}
}
}
else
{
return true;
}
}
}