Advertisement
Tectoon

[TFM] Mensagem Global para Admins

Oct 19th, 2015
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.08 KB | None | 0 0
  1. -- Depois iremos mudar o "print" para "tfm.exec.chatMessage" Quando liberarem!
  2.  
  3. admin =                 {       "Sagazgamer", "Tectoon", "Theapps" }    -- Sagazgamer: Admin -- Tectoon: Moderador -- Theapps: Mapcrew
  4.  
  5. system.disableChatCommandDisplay('help',true)
  6. system.disableChatCommandDisplay('adm',true)  -- Comando de Admins
  7. system.disableChatCommandDisplay('mod',true) -- Comando de Moderador
  8. system.disableChatCommandDisplay('map',true) -- Comando de Mapcrew
  9. function eventChatCommand(name, command)
  10.        
  11.         if command == 'help' then
  12.             print("<ROSE>Digite !mod<n> - Para falar como Moderador!                 <ROSE>Digite !adm<n> - Para falar como Admin! <ROSE>Digite !map<n> - Para falar como Mapcrew!",name)
  13.         end
  14.  
  15.  
  16.         for playerName, playerKey in pairs(admin) do
  17.        
  18.                 if playerKey == name then
  19.                                 message = string.find(command,"adm ",1)
  20.                                 if message == 1 then
  21.                                         print("<FONT COLOR=\"#DC85FF\">&#9824; [" .. name.. "]<B>" .. string.sub(command,message + 3,string.len(command)) .. "</B></FONT>")
  22.                                 end
  23.                 if playerKey == name then
  24.                                 message = string.find(command,"mod ",1)
  25.                                 if message == 1 then
  26.                                         print("<FONT COLOR=\"#0D82FF\">&#9824; [" .. name.. "]<B>" .. string.sub(command,message + 3,string.len(command)) .. "</B></FONT>")
  27.                     end
  28.                 if playerKey == name then
  29.                                 message = string.find(command,"map ",1)
  30.                                 if message == 1 then
  31.                                         print("<FONT COLOR=\"#FFAD00\">&#9824; [" .. name.. "]<B>" .. string.sub(command,message + 3,string.len(command)) .. "</B></FONT>")
  32.             end
  33.     end
  34. end
  35.  
  36.  
  37. function string.split(message)
  38.         i = 1
  39.         command = {}
  40.         for split in string.gmatch(message, "[^%s]+") do
  41.                 command[i] = split
  42.                 i = i + 1
  43.         end
  44.         return command
  45. end
  46. end
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement