14.08.2015, 21:26
You could make a rank system with all players using dof2?
My base display only online players:
My base display only online players:
PHP код:
new MaxData[11];
new MaxDataID[11];
new bool:OnTheRank[MAX_PLAYERS];
new DataSource[MAX_PLAYERS];
new Ranking[9000];
new DialogString[9000];
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i)) DataSource[i] = GetPlayerScore(i); //FONTE DE DADOS DO RANKING
}
for(new i; i < 11; i++){MaxData[i] = -1;MaxDataID[i] = -1;} //Preparar variбveis
for(new i; i < GetMaxPlayers(); i++) // Posiзгo 1є
{
if(IsPlayerConnected(i))
{
if(DataSource[i] > MaxData[1])
{
MaxData[1] = DataSource[i];
MaxDataID[1] = i;
}
}
}