of     1   

[rfa#hidefromsearch]
#36125258Thursday, October 28, 2010 1:49 PM GMT

[rfa#hidefromsearch]
[rfa#hidefromsearch]
#36125345Thursday, October 28, 2010 1:52 PM GMT

[rfa#hidefromsearch]
trappingnoobs
#36125351Thursday, October 28, 2010 1:53 PM GMT

New table, loop old one for highest repeatedly and remove the highest form the old one each time, then the old one will be empty and the new one will be in order.
[rfa#hidefromsearch]
#36125370Thursday, October 28, 2010 1:54 PM GMT

[rfa#hidefromsearch]
trappingnoobs
#36125399Thursday, October 28, 2010 1:56 PM GMT

Just use my method.
[rfa#hidefromsearch]
#36125437Thursday, October 28, 2010 1:58 PM GMT

[rfa#hidefromsearch]
trappingnoobs
#36125587Thursday, October 28, 2010 2:08 PM GMT

Heres an example Table={{"Jim",10},{"John",20}} SortedTable={} Highest=0 for u = 1, #Table do for i = 1, #Table do if Table[i][2]>Highest then Highest=Table[i][2] end end a=GetEntryFromHighest(Table,Highest,2) table.insert(SortedTable,a) table.remove(Table,a) Highest=nil end function GetEntryFromHighest(table,entry, key) for _,v in pairs(table) do if v[key]==entry then return v end Probably wouldn't work, just something that I typed out on the forum for an example.
oysi93
#36125628Thursday, October 28, 2010 2:10 PM GMT

I won't come up with a fancy table formula right now, because then I'd just explain so I'm making a script. =P Wait, I won't do that anyway because as I started making the script I immediately realized you set it up quite stupidly... =/ Make the Killstreaks be recorded into each player as IntValues, then this will work: StreakName = "Killstreak" -- What you name the killstreak intvalue thingy in each player function getTopKillstreaks(Top) local Players, TopP = Game.Players:GetPlayers(), {} for _, Player in next, Players do local Higher = 0 for _, oPlayer in next, Players do Higher = Higher + (oPlayer[StreakName].Value > Player[StreakName].Value and 1 or 0) end if Higher <= Top then TopP[#TopP + 1] = Player end end return TopP end If like, 5 players have the same killstreak, then all those five players will be returned. At least I think that'll happen. =P So you'll just have to exlcude randomly? >=D
trappingnoobs
#36125644Thursday, October 28, 2010 2:11 PM GMT

*Has been owned by oysi93*
[rfa#hidefromsearch]
#36125667Thursday, October 28, 2010 2:12 PM GMT

[rfa#hidefromsearch]
trappingnoobs
#36125702Thursday, October 28, 2010 2:14 PM GMT

>__< ThirdTable={} for f = 1,5 do table.insert(ThirdTable,SortedTable[f]) end
oysi93
#36125712Thursday, October 28, 2010 2:14 PM GMT

>_< *Feels stupid* Imagine _6_ players had the same killstreak, all would be returned. Btw, only reason I said five was because I gave you the easy ability to change how many of the highest you wanted... Top2 = getTopKillstreaks(2) Top3 = getTopKillstreaks(3) Top4 = getTopKillstreaks(4) I thought it would be a nice addition. =)
trappingnoobs
#36125734Thursday, October 28, 2010 2:16 PM GMT

Although using table.sort you could just find out who had what number, that way it'd only be a couple of lines.
oysi93
#36125803Thursday, October 28, 2010 2:20 PM GMT

Then you won't be able to find out who got those streaks. =P
[rfa#hidefromsearch]
#36125820Thursday, October 28, 2010 2:21 PM GMT

[rfa#hidefromsearch]
trappingnoobs
#36125893Thursday, October 28, 2010 2:25 PM GMT

@Oysi Just see who has what number. If 2 had the same they'd both end up with the same number after the calculations.
oysi93
#36125923Thursday, October 28, 2010 2:27 PM GMT

Sorting out a table with two values: 4 4 Player1: Oysi93 Player2: Trappingnoobs Getting the players from those scores... Oysi93 Oysi93 Heh. =P
trappingnoobs
#36125931Thursday, October 28, 2010 2:27 PM GMT

function AreTheyInTable(player,table) 3 or 4 lines end
[rfa#hidefromsearch]
#36125963Thursday, October 28, 2010 2:29 PM GMT

[rfa#hidefromsearch]

    of     1