Skip to content

Instantly share code, notes, and snippets.

@Patosito
Created September 12, 2016 19:18
Show Gist options
  • Save Patosito/3d220c3b0061cc595594c80a367e5ad9 to your computer and use it in GitHub Desktop.
Save Patosito/3d220c3b0061cc595594c80a367e5ad9 to your computer and use it in GitHub Desktop.
Volar con espacio
_space = 32
keyDelay = 200
kts = {}
function main()
for n in pairs(tfm.get.room.playerList) do
eventNewPlayer(n)
end
end
function eventNewPlayer(name)
kts[name] = os.time()
system.bindKeyboard(name, _space, true)
end
function eventKeyboard(name, key, down, px, py)
if os.time() < kts[name] + keyDelay then return end
kts[name] = os.time()
if key == _space then
tfm.exec.movePlayer(name, 0, 0, true, 0, -40, true)
end
end
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment