MaxproGlitcher

Pour le servers finder deluxe Test

May 18th, 2025
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. local function sortServers(servers, currentSort)
  2. if currentSort == "fastest" then
  3. table.sort(servers, function(a, b)
  4. return (a.ping or 9999) < (b.ping or 9999)
  5. end)
  6. elseif currentSort == "lowPlayers" then
  7. table.sort(servers, function(a, b)
  8. return a.playing < b.playing
  9. end)
  10. elseif currentSort == "maxPlayers" then
  11. table.sort(servers, function(a, b)
  12. return a.playing > b.playing
  13. end)
  14. end
  15. return servers
  16. end
  17.  
Advertisement
Add Comment
Please, Sign In to add comment