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

To reverse

$
0
0
I wanted someone to revert this ranking to the player that has less score instead of the more score.


PHP Code:


   
for(new i;i<MAX_PLAYERS;i++) 
    { 
    if(
IsPlayerConnected(i)) DataSource[i]  = GetPlayerScore(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>