06.08.2012, 03:04
The problem is obviously because this code isn't being ran.
Also, it doesn't make sense to loop through everything, and then check if response is true.
There could be a lot of things wrong, and you can easily fix this if you learn to debug. Perhaps the businesses' locations aren't even being loaded.
pawn Код:
if(amount > 0 && amount < 15000)
{
BusinessInfo[i][bFee][0] = amount;
GameTextForPlayer(playerid,"~g~Price has been changed",3000,4);
break;
}
pawn Код:
if(response)
{
for(new i = 0; i<MAX_BUSINESSES;i++) {
if(IsPlayerInRangeOfPoint(playerid,25,BusinessInfo[i][bEntranceX],BusinessInfo[i][bEntranceY],BusinessInfo[i][bEntranceZ]))
{
new amount = strval(inputtext);
if(amount > 0 && amount < 15000)
{
BusinessInfo[i][bFee][0] = amount;
GameTextForPlayer(playerid,"~g~Price has been changed",3000,4);
break;
}
}
}
}
else
{
ShowPlayerDialog(playerid, DIALOGID_BUSINESSPRICES, DIALOG_STYLE_LIST, "Business Menu", BItems(i), "Edit", "Back");
}

