Eshka

Untitled

Dec 26th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. data = {""} -- uma table sem valores
  2.  
  3. function newPlayerData(playerName) -- função para criar uma table pro player
  4. items = {["moedas"]=0} -- Você pode adicionar mais itens, separados por ";"
  5. data[playerName] = items -- cria a table
  6. end
  7.  
  8. function eventNewPlayer(playerName)
  9. newPlayerData(playerName)
  10. end
  11.  
  12. for playerName,name in pairs(tfm.get.room.playerList) do
  13. newPlayerData(playerName)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment