29.05.2014, 19:52
It should be something like this
Add this on the top:
And this is how you get the place of a player:
U know everyone rank now all what u need to do is add them to the textdraw
For example if you want to sendclientmessage to the player that are on 6th place
P.S haven't tested it if there's any errors tell me
Add this on the top:
pawn Код:
new place[MAX_PLAYERS];
new out[MAX_PLAYERS];
pawn Код:
for(new i=0; i < MAX_PLAYERS; i++)
{
out[i] = 0:
}
new places = 1;
for(new p =0; p < MAX_PLAYERS; p++)
{
new kills = 0;
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(out[i] != 1)
{
if(roundkills[i] >= kills)
{
kills = roundkills[i];
place[i] = places;
out[i] = 1;
places ++;
}
}
}
}
For example if you want to sendclientmessage to the player that are on 6th place
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
if(place[i] == 6)
{
SendClientMessage(i,-1,"bla boa");
}
}