Advertisement
Thetroz

Color de nombres al azar

Oct 2nd, 2016
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. function randomColor()
  2.     return "0x" .. string.format("%X", math.random(0x000000, 0xFFFFFF))
  3. end
  4.  
  5. function eventLoop (currentTime, timeRemaining)
  6.     for i=1,100 do
  7.         for p,_ in pairs(tfm.get.room.playerList) do
  8.             tfm.exec.setNameColor(p, randomColor());
  9.         end
  10.     end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement