Advertisement
Guest User

Untitled

a guest
May 26th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. ={}
  2.  
  3. function eventNewPlayer(n)
  4. p[n]={fly=false,speed=false,jump=false,tp=false}
  5. ui.addTextArea(0, "<p align='center'><b><a href='event:fly'>طيران</a>\n<a href='event:speed'>سرعة</a>\n<a href='event:jump'>قفز</a>\n<a href='event:tp'>انتقال</a>", n, 9, 328, 52, 63, 0x324650, 0x000000, 1, true)
  6. for k=0,100 do
  7. system.bindKeyboard(n,k,true,true)
  8. end
  9. system.bindMouse(n,true)
  10. end
  11. table.foreach(tfm.get.room.playerList,eventNewPlayer)
  12.  
  13. function eventTextAreaCallback(id,n,cb)
  14. if p[n][cb] then
  15. p[n][cb]=false
  16. else
  17. p[n][cb]=true
  18. end
  19. end
  20.  
  21. function eventKeyboard(n,k,d,x,y)
  22. if k==38 and p[n].fly then
  23. tfm.exec.movePlayer(n,0,0,false,0,-40,false)
  24.  
  25. elseif k==39 and p[n].speed then
  26. tfm.exec.movePlayer(n,0,0,false,100,0,false)
  27.  
  28. elseif k==37 and p[n].speed then
  29. tfm.exec.movePlayer(n,0,0,false,-100,0,false)
  30.  
  31. elseif k==32 and p[n].jump then
  32. tfm.exec.movePlayer(n,0,0,false,0,-230,false)
  33.  
  34. end
  35. end
  36.  
  37. function eventMouse(n,x,y)
  38. if p[n].tp then
  39. tfm.exec.movePlayer(n,x,y)
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement