Advertisement
Tectoon

[TFM] !cor

Sep 6th, 2015
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. adm = {Sagazgamer= true}
  2. namecolor = false
  3. function eventChatCommand(n,c)
  4.   local args={}
  5.   for argument in c:gmatch("[^%s]+") do
  6.     table.insert(args,argument)
  7.   end
  8.   if args[1]=="cor" and adm[n] then
  9.     if args[2]=="*" then
  10.       if args[3]~="rand" then
  11.         for i in pairs (tfm.get.room.playerList) do
  12.           tfm.exec.setNameColor(i,args[3])
  13.         end
  14.       else
  15.         if cor==true then
  16.           cor=false
  17.         elseif cor==false then
  18.           cor=true
  19.         end
  20.       end
  21.     elseif args[2]~="*" then
  22.       if args[3] then
  23.         if args[3]~="rand" then
  24.           tfm.exec.setNameColor(args[2],args[3])
  25.         else
  26.           tfm.exec.setNameColor(args[2],math.random(0xFFFFFF))
  27.         end
  28.       else
  29.         tfm.exec.setNameColor(args[2],math.random(0xFFFFFF))
  30.       end
  31.     end
  32.   end
  33. end
  34. function eventLoop()
  35.   if namecolor==true then
  36.     for i in pairs (tfm.get.room.playerList) do
  37.       tfm.exec.setNameColor(i,math.random(0xFFFFFF))
  38.     end
  39.   end
  40. end
  41.  
  42. for i,command in ipairs({"cor"}) do
  43.         system.disableChatCommandDisplay(command)
  44.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement