Dialog tab style list
#1

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.
Reply
#2

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.
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)