show bounties
#9

bump.., how can i do that..?
I tried the whole time, the best result was that when I was id 0 i was in the first place while the id 1 had lower bounty than id 0.
but when id 1 has higher bounty than id 0, it only will show id 1..


pawn Код:
if(strcmp(cmd,"/bounties",true)==0)
    {
        new List[MAX_PLAYERS][2];
        new count;
        foreach(Player,i)
        {
            if(bounty[i] > 0)
            {
                List[count][0] = i; //ID
                List[count][1] = bounty[i]; //BOUNTY
                count++;
            }
        }
        if(count == 0) return SendClientMessage(playerid,_COLOR_WHITE,"There are not any bounties at the moment.");
        else
        {
            for(new i; i < count; i++)
            {
                if(List[i][1] > List[i+1][1])
                {
                    format(string,sizeof string,"%s (%d) - $%d", PlayerName( List[i][0] ), List[i][0], bounty[ List[i][0] ]*1000);
                    SendClientMessage(playerid,_COLOR_YELLOW,string);
                }
            }
        }
        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: 1 Guest(s)