Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Deathmatch com outro cn
- cn = 1704 -- id do item que você quer que lance.
- tempo = 1000 -- o tempo que você quer pro item sumir
- velocidade = 40 -- a velocidade da direita
- velocidadee = -40 -- a velocidade da esquerda
- -- Aqui pra baixo não é editavel.
- despawn = {}
- function eventKeyboard(name, key, down, x, y)
- if key == 76 then
- local facingRight = tfm.get.room.playerList[name].isFacingRight
- table.insert(despawn, {tfm.exec.addShamanObject(cn, facingRight and x + 8 or x - 8, y - 7, facingRight and 90 or -90, facingRight and velocidade or velocidadee), os.time()})
- end
- end
- function eventLoop(ainda, acaba)
- for i,v in ipairs(despawn) do
- if v[2] < os.time() - tempo then
- tfm.exec.removeObject(v[1])
- table.remove(despawn, i)
- end
- end
- end
- for all in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(all, 76, true, true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement