Sorting Top killers
#5

Guys don't fight,

OnTopic: I have used both mixture of ******'s and G1venchy and it produces the result as i want
PHP код:
        enum infofof
        
{
            
kills,
            
kid
        
};
        new 
GetKillerID[MAX_PLAYERS][infofof];
        new    
count 0;
        foreach (new 
Player)
        {
            if(
Group[gattacker][gInTwar] == zoneid || Group[gattacked][gInTwar] == zoneid)
            {
                if(
Player[i][pInTwar] == zoneid)
                {
                    if(
Player[i][pGroup] == iswinner)
                        
SetPlayerScore(iGetPlayerScore(i) + 8);
                    
GetKillerID[count][kills] = Player[i][pTwarScores];
                    
count++;
                }
            }
        }
        
SortDeepArray(GetKillerIDkills);
        new 
rstr[500];
        
rstr "ID\tName\tKills";
        for(new 
0counti++)
        {
            foreach(new 
Player)
            {
                if(
Player[j][pTwarScores] == GetKillerID[i][kills])
                {
                    if(
Player[j][pInTwar] != zoneid)
                        continue;
                        
                    
GetKillerID[GetKillerID[i][kills]][kid] = j;
                }
            }
            new 
pid GetKillerID[GetKillerID[i][kills]][kid];
            new 
groupid Player[pid][pGroup];
            new 
colorid Group[groupid][gcolor];
            
format(rstrsizeof (rstr), "%s\n%d\t{%06x}%s\t%d"rstrpidPlayerColors[colorid] >>> 8Player[pid][Name], GetKillerID[i][kills]);
        }
        for(new 
0counti++)
        {
            new 
pid GetKillerID[GetKillerID[i][kills]][kid];
            if(
IsPlayerConnected(pid))
            {
                
ShowPlayerDialog(pidDIALOG_BLANKDIALOG_STYLE_TABLIST_HEADERS"Turf War Stats"rstr,"close","");
                
GetKillerID[i][kills] = 0;
            }
        } 
if there is any fastest method. i would love to hear it
Reply


Messages In This Thread
Sorting Top killers - by TwentyFour - 19.10.2018, 18:47
Re: Sorting Top killers - by g1venchy - 19.10.2018, 20:01
Re: Sorting Top killers - by g1venchy - 19.10.2018, 22:54
Re: Sorting Top killers - by agit - 20.10.2018, 05:26
Re: Sorting Top killers - by TwentyFour - 22.10.2018, 07:09

Forum Jump:


Users browsing this thread: 1 Guest(s)