Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admins = {Nickname = true}
- mods = {}
- mapcrews = {}
- baneados = {}
- chat = {}
- function eventLoop()
- for a in pairs(tfm.get.room.playerList) do
- tfm.exec.setNameColor(a, 0x009D9D)
- end
- for a in pairs(baneados) do
- tfm.exec.setNameColor(a, 0x664800)
- end
- for a in pairs(admins) do
- tfm.exec.setNameColor(a, 0xEB1D51)
- end
- for a in pairs(mods) do
- tfm.exec.setNameColor(a, 0xBADB2F)
- end
- for a in pairs(mapcrews) do
- tfm.exec.setNameColor(a, 0x2F7FCC)
- end
- end
- function eventPlayerRespawn(n)
- if baneados[n] then
- tfm.exec.killPlayer(n)
- end
- end
- function eventChatCommand(n, cmd)
- if baneados[n] then
- return
- end
- if admins[n] then
- if cmd:sub(0,3) == "ban" and tfm.get.room.playerList[cmd:sub(5)] then
- if cmd:sub(5)==n then
- else
- baneados[cmd:sub(5)]=true
- table.insert(chat, "\n<V>[•]<N> "..n.." ha baneado a "..cmd:sub(5)..".")
- for b in pairs(baneados) do
- tfm.exec.killPlayer(b)
- end
- end
- end
- for a in pairs(admins, mods, mapcrews) do
- if cmd:sub(0,5) == "admin" then
- admins[cmd:sub(0,7)]=true
- table.insert(chat, "\n<V>[•]<N> "..n.." ha agregado a <r>"..cmd:sub(7).."</r> al equipo de Administradores.")
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", a, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- if cmd:sub(0,3) == "mod" then
- mods[cmd:sub(0,5)]=true
- table.insert(chat, "\n<V>[•]<N> "..n.." ha agregado a <j>"..cmd:sub(5).."</j> al equipo de Moderadores.")
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", a, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- if cmd:sub(0,2) == "mc" then
- mapcrews[cmd:sub(0,4)]=true
- table.insert(chat, "\n<V>[•]<N> "..n.." ha agregado a <bv>"..cmd:sub(4).."</bv> al equipo de MapCrews.")
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", a, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- end
- end
- if admins[n] or mods[n] or mapcrews[n] then
- if cmd == "chat" then
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", n, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- if cmd:sub(0,3) == "mes" then
- if admins[n] then
- table.insert(chat, "\n<V>[<font color='#EB1D51'>"..n.."</font>]<N> "..cmd:sub(5))
- end
- if mods[n] then
- table.insert(chat, "\n<V>[<font color='#BADB2F'>"..n.."</font>]<N> "..cmd:sub(5))
- end
- if mapcrews[n] then
- table.insert(chat, "\n<V>[<font color='#2F7FCC'>"..n.."</font>]<N> "..cmd:sub(5))
- end
- for a in pairs(admins) do
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", a, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- for a in pairs(mods) do
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", a, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- for a in pairs(mapcrews) do
- ui.addTextArea(0, "<V>[•]<N> Bienvenido al chat del staff. Escribe !mes <vp>[Mensaje]</vp> para hablar"..table.concat(chat).."\n<a href='event:cerrarchat'>X</a>", a, 5, 20, 0, 0, 0x000001, 0x000001, 0.6, true)
- end
- end
- end
- end
- function eventTextAreaCallback(id, n, cb)
- if cb=="cerrarchat" then
- ui.removeTextArea(0, n)
- end
- end
- system.disableChatCommandDisplay("admin")
- system.disableChatCommandDisplay("mod")
- system.disableChatCommandDisplay("mc")
- system.disableChatCommandDisplay("chat")
- system.disableChatCommandDisplay("mes")
- system.disableChatCommandDisplay("ban")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement