Advertisement
Tectoon

[TFM] Comando !np e !reset

Sep 6th, 2015
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. adm = {Sagazgamer = true}
  2. function eventChatCommand(p,c)
  3.   local args={}
  4.     for i in c:gmatch('[^%s]+') do
  5.         table.insert(args,i)
  6.     end
  7.   if args[1]=="np" and adm[p] then
  8.     tfm.exec.disableAutoNewGame(true)
  9.     tfm.exec.disableAfkDeath(true)
  10.     if args[2] then
  11.       tfm.exec.newGame(args[2])
  12.     else
  13.       print("<R>O mapa não existe ou não carrega")
  14.     end
  15.   elseif args[1]=="reset" and adm[p] then
  16.     tfm.exec.newGame(tfm.get.room.currentMap)
  17.   end
  18. end
  19.  
  20. for i,command in ipairs({"np","reset"}) do
  21.         system.disableChatCommandDisplay(command)
  22.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement