RSSy MYGO.pl Opublikowano Kwiecień 12, 2021 o 15:28 RSSy Udostępnij Opublikowano Kwiecień 12, 2021 o 15:28 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 = 0, i, x; 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(i, namerecord[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(0, 255, 0, 0.38, 0.0, 0, 0.2, 3.0, 0.2, 0.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 Więcej opcji udostępniania...
Rekomendowane odpowiedzi