Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. red={}
  2. blue={}
  3. function makeTeams()
  4. local playerList={}
  5. for name,player in pairs(tfm.get.room.playerList) do
  6. table.insert(playerList,name)
  7. end
  8. for i=1,#playerList,1 do
  9. local index=math.random(#playerList)
  10. local name=playerList[index]
  11. if i%2==0 then
  12. table.insert(red,name)
  13. else
  14. table.insert(blue,name)
  15. end
  16. table.remove(playerList,index)
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement