Advertisement
Dudugz-Contistente

Untitled

Oct 11th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. tfm.exec.disableAfkDeath()
  2. tfm.exec.disableAutoNewGame()
  3.  
  4. maps, data = {7287025}, {}
  5.  
  6. reset_timeToShoot=function(name) data[name].timeToShoot=os.time(); end
  7.  
  8. function eventKeyboard(name,key,down,x,y)
  9. local shoot = (data[name].timeToShoot < os.time()-1200 and (key == 69 and true or false) or false)
  10. local id = (not tfm.get.room.playerList[name].isDead and (shoot and tfm.exec.addShamanObject(35, x + (tfm.get.room.playerList[name].isFacingRight and 10 or -10), y, 0,tfm.get.room.playerList[name].isFacingRight and 20 or -20) or nil) or nil)
  11. local a = (id == nil and nil or reset_timeToShoot(name))
  12. end
  13.  
  14. function eventNewPlayer(name)
  15. data[name] = (not data[name] and {
  16. timeToShoot = 0,
  17. } or data[name])
  18.  
  19. system.bindKeyboard(name,69,true) tfm.exec.respawnPlayer(name)
  20. end
  21.  
  22. table.foreach(tfm.get.room.playerList,eventNewPlayer)
  23. tfm.exec.newGame(maps[math.random(#maps)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement