Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --!speed para que los ratones puedan tener algo de velocidad
- --!speedoff para que ya no tengan velocidad
- velocidad=false
- function eventChatCommand (playerName, command)
- if command == "speed" and velocidad==false then
- print("<BV>Velocidad encendida")
- velocidad=true
- elseif command == "speedoff" and velocidad==true then
- print("<R>Velocidad apagada")
- velocidad=false
- end
- end
- function eventLoop(curTime, timeR)
- if velocidad==true then
- for player in pairs(tfm.get.room.playerList) do
- if(tfm.get.room.playerList[player].movingLeft) then
- tfm.exec.movePlayer(player,nil,nil,false,-100,nil,false)
- else if(tfm.get.room.playerList[player].movingRight) then
- tfm.exec.movePlayer(player,nil,nil,false,100,nil,false)
- end
- end
- end
- end
- end
- --Si quieres que todos los ratones empiecen ya teniendo velocidad, pues es esto:
- function eventLoop(curTime, timeR)
- for player in pairs(tfm.get.room.playerList) do
- if(tfm.get.room.playerList[player].movingLeft) then
- tfm.exec.movePlayer(player,nil,nil,false,-100,nil,false)
- else if(tfm.get.room.playerList[player].movingRight) then
- tfm.exec.movePlayer(player,nil,nil,false,100,nil,false)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement