Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSSort order is mixing sometimes


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
I have this code but sometimes sort order is mixing for public displayasdls(id).
Example:

Nick1 - 10 Goal
Nick2 - 9 Goal
Nick3 - 8 Goal
Nick4 - 7 Goal
Nick5 - 6 Goal

But sometime showing this type:
Nick5 - 6 Goal
Nick4 - 7 Goal
Nick1 - 10 Goal
Nick3 - 8 Goal
Nick2 - 9 Goal

can you fix this problem or can you convert this script ?
PHP Code:

public displayasdls(id)
{
        new 
steals[1025];
        new 
len 0ix;
        new 
temp_name[64];
        new 
stealrecord[33];
        new 
namerecord[64][64];
        
stealrecord[0]=0;
        for(
i=1;i<=maxplayers;i++)
        {
            if(!
is_user_bot(i) &&  !is_user_hltv(i) && is_user_connected(i)){        
                
stealrecord[i]=MadeRecord[i][STEAL];
                
get_user_name(inamerecord[i], 13)
            }
        }
        for(
x=1;x<maxplayers;x++)
        {
            for(
i=1;i<=maxplayers;i++)
            {
                if(
stealrecord[i]>stealrecord[i-1])
                {
                    
x=stealrecord[i];
                    
stealrecord[i]=stealrecord[i-1];
                    
stealrecord[i-1]=x;
                    
temp_name=namerecord[i];
                    
namerecord[i]=namerecord[i-1];
                    
namerecord[i-1]=temp_name;
                }
            }
        }
        
len += format(steals[len], 512-len"TOP STEAL^n^n")
        
len += format(steals[len], 512-len"%s  -  %i^n",namerecord[0], stealrecord[0])
        
len += format(steals[len], 512-len"%s  -  %i^n",namerecord[1], stealrecord[1])
        
len += format(steals[len], 512-len"%s  -  %i^n",namerecord[2], stealrecord[2])
        
len += format(steals[len], 512-len"%s  -  %i^n",namerecord[3], stealrecord[3])
        
len += format(steals[len], 512-len"%s  -  %i",namerecord[4], stealrecord[4])
        
        
set_dhudmessage(02550,  0.380.000.23.00.20.1)
        
show_dhudmessage(id"%s"steals)


PHP Code:

new MadeRecord[MAX_PLAYER 1][RECORDS+1

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...