show bounties
#8

ok thx for your code, but i decided to show the bounties with dialog.
now my question, how can I do, that it orders by the largest bounty?!

Example:
#1 Ribber(ID: 3) $ 34000
#2 Player2(ID: 0) $ 30000
#3 Player3(ID: 5) $ 26000
#4 Player4(ID: 1) $ 22000
.....

my code:

pawn Код:
if(strcmp(cmd,"/bounties",true)==0)
    {
        new amount;
        new list[500];
        foreach(Player,i)
        {
            if(bounty[i] > 0)
            {
                amount++;
                format(string,sizeof string,"#%d\t%s(ID: %d)\t $%d\n",amount, PlayerName(i), i, bounty[i]*1000);
                strcat(list,string);
            }
        }
        if(amount == 0) return SendClientMessage(playerid,_COLOR_WHITE,"There are not any bounties at the moment.");
        else
        {
            new header[30];
            format(header,sizeof(header),"Bounties: %d",amount);
            ShowPlayerDialog(playerid,300,DIALOG_STYLE_LIST,header,list,"Close", "Close");
        }
        return 1;
    }
Reply


Messages In This Thread
show bounties - by Ribber - 05.12.2010, 17:55
AW: show bounties - by Ribber - 06.12.2010, 14:43
Re: show bounties - by Sergei - 06.12.2010, 14:47
AW: show bounties - by Ribber - 06.12.2010, 15:58
AW: show bounties - by Ribber - 07.12.2010, 16:11
AW: show bounties - by Ribber - 09.12.2010, 13:01
Re: show bounties - by Mehtab - 09.12.2010, 13:26
AW: show bounties - by Ribber - 09.12.2010, 16:44
AW: show bounties - by Ribber - 09.12.2010, 20:14

Forum Jump:


Users browsing this thread: 5 Guest(s)