Eu queria que alguém revertesse esse ranking para o player que tem menos x em vez do que tem mais x.
PHP Code:
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)) DataSource[i] = eerer[i];
}
for(new i; i < 14; i++){MaxData[i] = -1 ;MaxDataID[i] = -1;}
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(DataSource[i] > MaxData[1])
{
MaxData[1] = DataSource[i];
MaxDataID[1] = i;
}
}
}
if(MaxDataID[1] != -1) OnTheRank[MaxDataID[1]] = true;
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(DataSource[i] > MaxData[2] && DataSource[i] <= MaxData[1] && MaxDataID[1] != i && OnTheRank[i] == false)
{
MaxData[2] = DataSource[i];
MaxDataID[2] = i;
}
}
}
if(MaxDataID[2] != -1) OnTheRank[MaxDataID[2]] = true;
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(DataSource[i] > MaxData[3] && DataSource[i] <= MaxData[2] && MaxDataID[2] != i && OnTheRank[i] == false)
{
MaxData[3] = DataSource[i];
MaxDataID[3] = i;
}
}
}
if(MaxDataID[3] != -1) OnTheRank[MaxDataID[3]] = true;
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(DataSource[i] > MaxData[4] && DataSource[i] <= MaxData[3] && MaxDataID[3] != i && OnTheRank[i] == false)
{
MaxData[4] = DataSource[i];
MaxDataID[4] = i;
}
}
}
if(MaxDataID[4] != -1) OnTheRank[MaxDataID[4]] = true;
for(new i; i < 4; i++)
{
if(MaxDataID[i] != -1)
{
new playerid;
new Name[MAX_PLAYER_NAME];
GetPlayerName(MaxDataID[i], Name, sizeof(Name));
format(Ranking, sizeof(Ranking), "");
}
}