SA-MP Forums Archive
Problem with dialog tablist - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with dialog tablist (/showthread.php?tid=620732)



Problem with dialog tablist - DemME - 02.11.2016

Quote:

new str[128], dialog[1000];
format(str, sizeof(str), "{009933}Item\tQuantity{FFFFFF}\n");
strcat(dialog, str, sizeof(dialog));
if(Inventory[playerid][PhoneStatus] > 0)
{
format(str, sizeof(str), "Phone Device ({009933}%d{FFFFFF})\t%d\n", Inventory[playerid][PhoneNumber], Inventory[playerid][PhoneStatus]);
strcat(dialog, str, sizeof(dialog));
}
if(Inventory[playerid][VehicleRadio] > 0)
{
format(str, sizeof(str), "Vehicle Radio\t%d\n", Inventory[playerid][VehicleRadio]);
strcat(dialog, str, sizeof(dialog));
}
if(Inventory[playerid][Radio] > 0)
{
format(str, sizeof(str), "Portable Radio(%d hMz)\t%d\n", Inventory[playerid][RadioFreq], Inventory[playerid][Radio]);
strcat(dialog, str, sizeof(dialog));
}
if(Inventory[playerid][Screwdriver] > 0)
{
format(str, sizeof(str), "Screwdriver\t%d\n", Inventory[playerid][Screwdriver]);
strcat(dialog, str, sizeof(dialog));
}
Dialog_Show(playerid, INVENTORY, DIALOG_STYLE_TABLIST, "INVENTORY", dialog,"Close","");
}
return 1;
}

But the title of the dialog isn't showing header titles, it shows it as a new line.. How do I do so without breaking the formats?


Re: Problem with dialog tablist - GoldenLion - 02.11.2016

You need to use DIALOG_STYLE_TABLIST_HEADERS.