Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function firstPlayer()
- local player1
- local scores={}
- for i,score in pairs(tfm.get.room.playerList) do
- table.insert(scores, tfm.get.room.playerList[i].score)
- end
- table.sort(scores)
- for name,player in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[name].score == scores[#scores] then
- player1=name
- end
- end
- return player1
- end
Advertisement
Add Comment
Please, Sign In to add comment