09.12.2010, 20:14
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..
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;
}