Dialog tab style list - 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: Dialog tab style list (
/showthread.php?tid=663228)
Dialog tab style list -
SymonClash - 25.01.2019
Ok, i'm stuck like a stupid here, problem is because me and DIALOG_STYLE_TABLIST_HEADERS are not friends.
Basically, i have a bounty system on my server, and i wanna show players with bounty in the dialog.
Playername | Bounty ammount | Location.
I did in this way:
pawn Code:
foreach(new i : Player)
{
if(Player[i][Bounty] > 0)
{
count++;
format(string, sizeof(string), "%s (%d) | Bounty: "GREEN"%s", ReturnPlayerName(i), i, formatInt(Player[i][Bounty]));
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Caption", "Player\tBounty\tLocation\n\"%s (%d)"\t"%s"\t"%s"\n\",
"Button 1", "Button 2");
}
}
But it's surely wrong, only with this type of dialogs i've always problems! Thanks.
Re: Dialog tab style list -
Hazon - 25.01.2019
Do it like this.
Code:
new list[500];
format(list, sizeof(list), "Name\tBount ammount\tLocation\n");
format(list, sizeof(list), "blablablablablablablalba", ReturnPlayerName(i), i, formatInt(Player[i][Bounty]));
string this format in dialog and that's it.
Re: Dialog tab style list -
SymonClash - 25.01.2019
Did in this way:
pawn Code:
new list[500];
format(list, sizeof(list), "Name\tBounty ammount\tLocation\n");
format(list, sizeof(list), "%s (%i) (%s) %s", ReturnPlayerName(i), i, formatInt(Player[i][Bounty], zone));
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, ""#SERVER_NAME" - Wanted Players Online", list, "Close","");
But getting argument type mismatch at the second format.
EDIT: Fixed, thanks.