Alex_ilinov
Новичок
Не могу разобраться со скобками помогите
мне надо убрать всё после for(new h = 0; h < sizeof(HouseInfo); h++) Помогите плиз
PHP:
public CustomPickups()
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new string[128];
NameTimer();
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, oldposx, oldposy, oldposz);
new tmpcar = GetPlayerVehicleID(i);
if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
{
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);
GameTextForPlayer(i, string, 5000, 3);
return true;
}
if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
if(SBizzInfo[h][sbOwned] == 1)
{
new str[128],sctring[400];
format(str,sizeof(str),"{FFFFFF}_______________________________________\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Áèçíåñ: %s\n",SBizzInfo[h][sbMessage]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Âëàäåëåö: %s\n",SBizzInfo[h][sbOwner]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Çàìåñòèòåëü: %s\n",SBizzInfo[h][sbExtortion]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Öåíà âõîäà: $%d\n",SBizzInfo[h][sbEntranceCost]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Ïðîäóêòû: $%d [%d/500]\n\n",SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbProducts]);
strcat(sctring,str);
format(str,sizeof(str),"{FFFFFF}_______________________________________");
strcat(sctring,str);
new lol[35];
format(lol,sizeof(lol),"Èíôî î áèçíåñå");
ShowPlayerDialog(i,1323,DIALOG_STYLE_MSGBOX,lol,sctring,"Çàêðûòü","");
}
else
{
new str[128],sctring[400];
format(str,sizeof(str),"{FFFFFF}_______________________________________\n\n{AFEEEE}•{FFFFFF} /buybiz - êóïèòü ýòîò áèçíåñ\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Áèçíåñ: %s\n",SBizzInfo[h][sbMessage]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Öåíà: %d\n",SBizzInfo[h][sbBuyPrice]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Çàìåñòèòåëü: None\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Öåíà âõîäà: $%d\n",SBizzInfo[h][sbEntranceCost]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Ïðîäóêòû: $%d [%d/500]\n\n",SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbProducts]);
strcat(sctring,str);
format(str,sizeof(str),"{FFFFFF}_______________________________________");
strcat(sctring,str);
new lol[35];
format(lol,sizeof(lol),"Èíôî î áèçíåñå");
ShowPlayerDialog(i,1323,DIALOG_STYLE_MSGBOX,lol,sctring,"Çàêðûòü","");
}
return true;
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);
GameTextForPlayer(i, string, 5000, 3);
return true;
}
if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
if(BizzInfo[h][bOwned] == 1)
{
new str[128],sctring[400];
format(str,sizeof(str),"{FFFFFF}_______________________________________\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Áèçíåñ: %s\n",BizzInfo[h][bMessage]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Âëàäåëåö: %s\n",BizzInfo[h][bOwner]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Çàìåñòèòåëü: %s\n",BizzInfo[h][bExtortion]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Öåíà âõîäà: $%d\n",BizzInfo[h][bEntranceCost]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Ïðîäóêòû: $%d [%d/500]\n\n",BizzInfo[h][bPriceProd],BizzInfo[h][bProducts]);
strcat(sctring,str);
format(str,sizeof(str),"{FFFFFF}_______________________________________");
strcat(sctring,str);
new lol[35];
format(lol,sizeof(lol),"Èíôî î áèçíåñå");
ShowPlayerDialog(i,1323,DIALOG_STYLE_MSGBOX,lol,sctring,"Çàêðûòü","");
}
else
{
new str[128],sctring[400];
format(str,sizeof(str),"{FFFFFF}_______________________________________\n\n{AFEEEE}•{FFFFFF} /buybiz - êóïèòü ýòîò áèçíåñ\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Áèçíåñ: %s\n",BizzInfo[h][bMessage]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Öåíà: %d\n",BizzInfo[h][bBuyPrice]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Çàìåñòèòåëü: None\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Öåíà âõîäà: $%d\n",BizzInfo[h][bEntranceCost]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Ïðîäóêòû: $%d [%d/500]\n\n",BizzInfo[h][bPriceProd],BizzInfo[h][bProducts]);
strcat(sctring,str);
format(str,sizeof(str),"{FFFFFF}_______________________________________");
strcat(sctring,str);
new lol[35];
format(lol,sizeof(lol),"Èíôî î áèçíåñå");
ShowPlayerDialog(i,1323,DIALOG_STYLE_MSGBOX,lol,sctring,"Çàêðûòü","");
}
return true;
}
}
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(0.5, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
if(HouseInfo[h][hOwned] == 1)
{
if(HouseInfo[h][hRentabil] == 0)
{
new str[128],sctring[300];
format(str,sizeof(str),"{FFFFFF}________________________________\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Âëàäåëåö: %s\n",HouseInfo[h][hOwner]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Àðåíäà: $%d\n",HouseInfo[h][hRent]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Óðîâåíü: %d\n",HouseInfo[h][hLevel]);
strcat(sctring,str);
format(str,sizeof(str),"{FFFFFF}________________________________\n");
strcat(sctring,str);
new lol[35];
format(lol,sizeof(lol),"Äîì ¹{AFEEEE} %d",h);
ShowPlayerDialog(i,6,DIALOG_STYLE_MSGBOX,lol,sctring,"Ok","");
return true;
}
else
{
new str[128],sctring[300];
format(str,sizeof(str),"{FFFFFF}________________________________\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Âëàäåëåö: %s\n",HouseInfo[h][hOwner]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Àðåíäà: $%d\n",HouseInfo[h][hRent]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Óðîâåíü: %d\n\n",HouseInfo[h][hLevel]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}• /rentroom - àðåíäîâàòü êîìíàòó\n{FFFFFF}________________________________");
strcat(sctring,str);
new lol[35];
format(lol,sizeof(lol),"Äîì ¹ {AFEEEE}%d",h);
ShowPlayerDialog(i,6,DIALOG_STYLE_MSGBOX,lol,sctring,"Àðåíäà","");
return true;
}
}
else
{
new str[128],sctring[300],lol[35];
format(str,sizeof(str),"{FFFFFF}________________________________\n\n");
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Ñòîèìîñòü: $%d\n",HouseInfo[h][hValue]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} Óðîâåíü: %d\n\n",HouseInfo[h][hLevel]);
strcat(sctring,str);
format(str,sizeof(str)," {AFEEEE}•{FFFFFF} /buyhouse - êóïèòü ýòîò äîì\n");
strcat(sctring,str);
format(str,sizeof(str),"{FFFFFF}________________________________");
strcat(sctring,str);
format(lol,sizeof(lol),"Äîì ¹ {AFEEEE}%d",h);
ShowPlayerDialog(i,7,DIALOG_STYLE_MSGBOX,lol,sctring,"Ok","");
return true;
}
}
}
}
}
}
return true;
}
Последнее редактирование:
