10.01.2015, 10:32
you're doing
No matter if you have the clothes or the 24/7 dialog before, you use "listitem"... there is no seperation which dialog you had before...
You should add something like
or
into this part:
so you can later on seperate it
pawn Код:
case 6542:
{
if(response)
{
new item = listitem +1;
SelBusiness[playerid] = item;
You should add something like
pawn Код:
playerStoreType[playerid] = 0;
pawn Код:
playerStoreType[playerid] = 1;
pawn Код:
if(response)
{
switch(listitem)
{
case 0:
{
new szString[980];
new szDialogString[128];
for(new xf = 0; xf < MAX_BUSINESSES; xf++)
{
if(businessVariables[xf][bType] == 69)
{
if(businessVariables[xf][bType] == 69)
{
format(szDialogString, 128, "24/7 Store");
}
new Float: fDistance = GetPlayerDistanceFromPoint(playerid, businessVariables[xf][bExteriorPos][0], businessVariables[xf][bExteriorPos][1], businessVariables[xf][bExteriorPos][2]);
format(szString, sizeof(szString), "%s\n%s (%.0fm away)", szString,szDialogString, fDistance);
}
}
ShowPlayerDialog(playerid, 6542, DIALOG_STYLE_LIST, "24/7 Store", szString, "Checkpoint", "Cancel");
}
case 1:
{
new szString[980];
new szDialogString[128];
for(new xf = 0; xf < MAX_BUSINESSES; xf++)
{
if(businessVariables[xf][bType] == 34)
{
if(businessVariables[xf][bType] == 34)
{
format(szDialogString, 128, "Clothing Store");
}
new Float: fDistance = GetPlayerDistanceFromPoint(playerid, businessVariables[xf][bExteriorPos][0], businessVariables[xf][bExteriorPos][1], businessVariables[xf][bExteriorPos][2]);
format(szString, sizeof(szString), "%s\n%s (%.0fm away)", szString,szDialogString, fDistance);
}
}
ShowPlayerDialog(playerid, 6542, DIALOG_STYLE_LIST, "Clothing Store", szString, "Checkpoint", "Cancel");
}
}
}