Spieler Ranking
Übersicht

![]() |
Mathias-KwiatkowskiBetreff: Spieler Ranking |
![]() Antworten mit Zitat ![]() |
---|---|---|
hi leute ich hatte vor ein benutzer ranking zu programmieren, bislang funktionierte es auch immer sehr gut bis auf einmal... und ab da nie wieder...
ich habe 2 Listen erstellt und habe alles vor-sotiert. hat einer ein besseren vorschlag dieses umzusetzen? und falls nich, vieleicht findet jemand ein fehler, ich habe bislang leider kein gefunden. Code: [AUSKLAPPEN] 'User Ranking anzeigen
If UserAktiv = 3 Then Anzahl:Int = 0 For Ranking:TRanking = EachIn RankingList Anzahl = Anzahl + 1 Next For s = 1 To anzahl punkte:Int = 0 For Ranking:TRanking = EachIn RankingList If Ranking.Ehre > punkte Then punkte = Ranking.Ehre nam:String = Ranking.Name RankingList.Remove Ranking Next TRankings.Create (nam, punkte) Next xr:Int = ScreenWidth - ImageWidth(RankIMG) yr:Int = 36 Rang:Int = 1 DrawImage RankIMG, xr, yr oft:Int = 0 R:Int = 255 G:Int = 0 Mach:Int = 10 If Anzahl < 10 Then Mach:Int = Anzahl For Rankings:TRankings = EachIn RankingsList If oft >= Mach Then Goto beenderank SetColor 255, 255, 255 DrawText "Rang " + Rang + " ) ", xr + 3, yr + 3 + rang * TextHeight("W") - TextHeight("W") SetColor 255, 255, 0 DrawText Rankings.Name, xr + 3 + TextWidth("Rang " + Rang + " ) "), yr + 3 + rang * TextHeight("W") - TextHeight("W") SetColor g, R, 0 r = r - 25 'g = g + 25 DrawText Rankings.Ehre, ScreenWidth - 5 - TextWidth(Rankings.Ehre), yr + 3 + rang * TextHeight("W") - TextHeight("W") Rang = Rang + 1 oft = oft + 1 Next #beenderank Rang = 0 For Rankings:TRankings = EachIn RankingsList Rang = Rang + 1 If Rankings.Name = BenutzerName Then SetColor 255, 255, 255 DrawText "Dein Rang " + Rang + " ) ", xr + 11, yr + 145 SetColor 255, 255, 0 DrawText Rankings.Name, xr + 11 + TextWidth("Dein Rang " + Rang + " ) "), yr + 145 SetColor 0, R, 0 DrawText Rankings.Ehre, xr + 11 + TextWidth("Dein Rang " + Rang + " ) " + Rankings.name), yr + 145 EndIf Next SetColor 255, 255, 255 For Rankings:TRankings = EachIn RankingsList TRanking.Create (Rankings.Name, Rankings.Ehre) RankingsList.Remove Rankings Next End If Erledigt * habe es mit der mysql geregelt ( "ORDER BY points" ) |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group