Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Ajuda] Reverter ranking

$
0
0
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 
i14i++){MaxData[i] = -;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] != -1OnTheRank[MaxDataID[1]] = true;

    for(new 
i;i<MAX_PLAYERS;i++)
    {



        if(
IsPlayerConnected(i))
        {




            if(
DataSource[i] > MaxData[2] && DataSource[i] <= MaxData[1] && MaxDataID[1] != && OnTheRank[i] == false)
            {



                
MaxData[2] = DataSource[i];
                
MaxDataID[2] = i;
            }
        }
    }
    if(
MaxDataID[2] != -1OnTheRank[MaxDataID[2]] = true;

    for(new 
i;i<MAX_PLAYERS;i++)
    {



        if(
IsPlayerConnected(i))
        {




            if(
DataSource[i] > MaxData[3] && DataSource[i] <= MaxData[2] && MaxDataID[2] != && OnTheRank[i] == false)
            {




                
MaxData[3] = DataSource[i];
                
MaxDataID[3] = i;
            }
        }
    }
    if(
MaxDataID[3] != -1OnTheRank[MaxDataID[3]] = true;

    for(new 
i;i<MAX_PLAYERS;i++)
    {



        if(
IsPlayerConnected(i))
        {




            if(
DataSource[i] > MaxData[4] && DataSource[i] <= MaxData[3] && MaxDataID[3] != && OnTheRank[i] == false)
            {




                
MaxData[4] = DataSource[i];
                
MaxDataID[4] = i;
            }
        }
    }
    if(
MaxDataID[4] != -1OnTheRank[MaxDataID[4]] = true;

    for(new 
i4i++)
    {



        if(
MaxDataID[i] != -1)
        {



            new 
playerid;
            new 
Name[MAX_PLAYER_NAME];
            
GetPlayerName(MaxDataID[i], Namesizeof(Name));
            
format(Rankingsizeof(Ranking), "");
        }
    } 


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>