18.02.2011, 19:58
thx for ur answers.
But i already tried it like this:
But maybe the error is here, can i compare the kills of the players like this?
But i already tried it like this:
pawn Код:
DeathsInRound[playerid]++;
if(killerid!=INVALID_PLAYER_ID)
{
KillsInRound[killerid]++;
}
pawn Код:
new TotalScores[21];//21 cause i wanna compare 20 players.
new TotalPlayers[21];
new PlayerScore[2];
new PlayerID[2];
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerScore[0] = KillsInRound[i]; //killsperround
PlayerID[0] = i;
for(new place; place < sizeof(TotalScores); place++)
{
if(PlayerScore[0] > TotalScores[place])
{
strins(TotalScores, PlayerScore, place);
strins(TotalPlayers, PlayerID, place);
place = sizeof(TotalScores);
}
}
}