Tectoon

[TFM] Coração te segue '-'

Jul 6th, 2015
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. players={}
  2. i=0
  3.  
  4. mouseLeft=[[
  5. <font color="#FF332F"><font size='50' face='Verdana'>
  6. ]]
  7. mouseRight=[[
  8. <font color="#FF332F"><font size='60' face='Verdana'>
  9. ]]
  10.  
  11. function eventNewPlayer(name)
  12. players[name]={
  13. x=tfm.get.room.playerList[name].x,
  14. y=tfm.get.room.playerList[name].y,
  15. id=i
  16. }
  17. print(players[name].x)
  18. if(tfm.get.room.playerList[name].isFacingRight) then
  19. mouse=mouseRight
  20. else
  21. mouse=mouseLeft
  22. end
  23. ui.addTextArea(players[name].id,mouse,nil,players[name].x,players[name].y,0,0,0xffffff,0xffffff,0.0)
  24. i=i+1
  25. end
  26.  
  27. for name,player in pairs(tfm.get.room.playerList) do
  28. eventNewPlayer(name)
  29. end
  30.  
  31. function eventLoop(tc,tr)
  32. for name,player in pairs(tfm.get.room.playerList) do
  33. if not tfm.get.room.playerList[name].isDead then
  34. local x= tfm.get.room.playerList[name].x
  35. local y= tfm.get.room.playerList[name].y
  36. if(tfm.get.room.playerList[name].isFacingRight) then
  37. mouse=mouseRight
  38. x=x-40
  39. else
  40. mouse=mouseLeft
  41. x=x-45
  42. end
  43. y=y-70
  44. if(x~=players[name].x) or (y~=players[name].y) then
  45. ui.addTextArea(players[name].id,mouse,nil,x,y,0,0,0xffffff,0xffffff,0.0)
  46. end
  47. end
  48. end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment