Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local movendo = {}
- function eventEmotePlayed(name,e)
- if e == 8 then
- table.insert(movendo,name)
- end
- end
- function eventKeyboard(name, key, down, x, y)
- if (key == 83 or key == 87) then
- table.insert(movendo,name)
- end
- end
- function eventLoop()
- for _,name in pairs(movendo) do
- if tfm.get.room.playerList[name].isFacingRight then
- tfm.exec.movePlayer(name,0,0,true,10,0,true)
- else
- tfm.exec.movePlayer(name,0,0,true,-10,0,true)
- end
- end
- end
- function eventNewPlayer(name)
- for keys, k in pairs({81,83,68,87,37,38,39,40}) do
- tfm.exec.bindKeyboard(name,k,true,true)
- end
- end
- for name in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement