Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Admin = {"nick"} -- wspisz swój nick tutaj
- obj_id = {}
- obj_ilosc = {}
- explosion = {}
- isRemove = true
- function test(nick)
- tfm.exec.addImage("1507b1a98c7.png", "%"..nick, -25, -30, nil)
- end
- function isAdmin(nick)
- for v, arg in pairs(Admin) do
- if arg == nick then
- return true
- end
- end
- end
- function adminsMessage(txt)
- for v, arg in pairs(Admin) do
- tfm.exec.chatMessage(txt, arg)
- end
- end
- function eventNewPlayer(nick)
- obj_id[nick] = ""
- obj_ilosc[nick] = ""
- explosion[nick] = {boolean = false, txt = "<R>Wył.</R>"}
- for v, arg in pairs({0,2,68,81}) do
- system.bindKeyboard(nick, arg, true, true)
- end
- system.bindMouse(nick, true)
- if isAdmin(nick) then
- ui.addTextArea(1, "<a href='event:ex'>Eksplozja: "..explosion[nick].txt.."</a>", nick, 700, 380, 90, 20, 0x121212, 0x121212, 1, true)
- end
- end
- for nick in pairs(tfm.get.room.playerList) do
- eventNewPlayer(nick)
- end
- function eventNewGame()
- for nick in pairs(tfm.get.room.playerList) do
- if isAdmin(nick) then
- test(nick)
- end
- end
- end
- function eventPlayerRespawn(nick)
- if isAdmin(nick) then
- test(nick)
- end
- end
- function eventChatCommand(nick, cmd)
- if isAdmin(nick) then
- if cmd:sub(1,5) == "balls" and tonumber(cmd:sub(7)) then
- if tonumber(cmd:sub(7)) <= 20 then
- obj_id[nick] = 606
- obj_ilosc[nick] = tonumber(cmd:sub(7))
- end
- elseif cmd:sub(1,6) == "sheeps" and tonumber(cmd:sub(8)) then
- if tonumber(cmd:sub(8)) <= 10 then
- obj_id[nick] = 40
- obj_ilosc[nick] = tonumber(cmd:sub(8))
- end
- elseif cmd:sub(1,9) == "snowballs" and tonumber(cmd:sub(11)) then
- if tonumber(cmd:sub(11)) <= 20 then
- obj_id[nick] = 34
- obj_ilosc[nick] = tonumber(cmd:sub(11))
- end
- elseif cmd:sub(1,6) == "anvils" and tonumber(cmd:sub(8)) then
- if tonumber(cmd:sub(8)) <= 15 then
- obj_id[nick] = 10
- obj_ilosc[nick] = tonumber(cmd:sub(8))
- end
- elseif cmd:sub(1,3) == "ice" and tonumber(cmd:sub(5)) then
- if tonumber(cmd:sub(5)) <= 8 then
- obj_id[nick] = 54
- obj_ilosc[nick] = tonumber(cmd:sub(5))
- end
- elseif cmd:sub(1,1) == "f" then
- tfm.exec.chatMessage("<CE><B>[TROLL]</B> "..cmd:sub(3).."</CE>")
- end
- end
- end
- function eventMouse(nick, x, y)
- if isAdmin(nick) then
- if explosion[nick].boolean == true then
- tfm.exec.explosion(x, y, 80, 100, false)
- end
- if obj_id[nick] ~= "" then
- for v = 1, obj_ilosc[nick] do
- if obj_id[nick] ~= 34 then
- tfm.exec.addShamanObject(obj_id[nick], x + math.random(-5,5), y + math.random(-5,5), 0, 0, 0, false)
- else
- tfm.exec.addShamanObject(obj_id[nick], x + math.random(-5,5), y + math.random(-5,5), 0, 60, 0, false)
- end
- end
- obj_id[nick] = ""
- end
- end
- end
- function eventTextAreaCallback(id, nick, odp)
- if odp == "ex" then
- if explosion[nick].boolean == false then
- explosion[nick].txt = "<VP>Wł.</V>"
- explosion[nick].boolean = true
- ui.addTextArea(1, "<a href='event:ex'>Eksplozja: "..explosion[nick].txt.."</a>", nick, 700, 380, 90, 20, 0x121212, 0x121212, 1, true)
- else
- explosion[nick].txt = "<R>Wył.</R>"
- explosion[nick].boolean = false
- ui.addTextArea(1, "<a href='event:ex'>Eksplozja: "..explosion[nick].txt.."</a>", nick, 700, 380, 90, 20, 0x121212, 0x121212, 1, true)
- end
- end
- end
- eventNewGame()
- system.disableChatCommandDisplay(nil, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement