02.08.2012, 22:48
Hello, I am wondering why this is not working:
When the player goes and that dialog comes up and they respond, the variable doesn't get set...
pawn Код:
if(dialogid == DIALOGID_BS)
{
for(new i = 0; i<MAX_BUSINESSES;i++)
{
if(response)
{
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");
}
}
}
if(dialogid == DIALOGID_BS1)
{
for(new i = 0; i<MAX_BUSINESSES;i++)
{
if(response)
{
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][1] = 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");
}
}
}
if(dialogid == DIALOGID_BS2)
{
for(new i = 0; i<MAX_BUSINESSES;i++)
{
if(response)
{
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][2] = 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");
}
}
}