Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.38 KB | None | 0 0
  1. User = {}
  2. UserData = {}
  3. UserData["RANK"] = 0
  4. UserData["muteEnd"] = 0
  5. UserData["speclockEnd"] = 0
  6. UserData["TRANKTIME"] = 0
  7. UserData["TRANK"] = 0
  8.  
  9. function PlayerLevel(id)
  10.     if (User[id]["TRANKTIME"] ~= nil) and (User[id]["TRANKTIME"] > os.time()) then
  11.         return tonumber(User[id]["TRANK"])
  12.     else
  13.         User[id]["TRANKTIME"] = nil
  14.         User[id]["TRANK"] = nil
  15.     end
  16.     -- 25 Owner
  17.     -- 20 Admin
  18.     -- 15 Moderator
  19.     -- 10 Donator
  20.     -- 5 VIP
  21.     -- 0 Player
  22.     return tonumber(User[id]["RANK"])
  23. end
  24.  
  25. player_tag = {}
  26.  
  27. function table.find(t,v)
  28.     for _k,_v in pairs(t) do
  29.         if _v == v then
  30.             return _k
  31.         end
  32.     end
  33. end
  34.  
  35. addhook("clientdata","aow")
  36. function aow(id,mode,x,y)
  37.     if mode == 2 then
  38.         parse("setpos "..id.." "..x.." "..y)
  39.     end
  40. end
  41.  
  42. addhook("serveraction","bow")
  43. function bow(id,buton)
  44.     if PlayerLevel(id) >= 20 then
  45.         if buton==1 then
  46.             reqcld(id,2)
  47.         end
  48.     end
  49. end
  50.  
  51. addhook("join","joinhook")
  52. function joinhook(id,txt)
  53.     msg2(id,"©255255255Welcome to the NoPain Happy Town!")
  54.     msg2(id,"©255255255You can use !help to see all your avalibe commands.")
  55.     msg2(id,"©255255255Please read (press F1) and follow the rules.")
  56.     msg2(id,"©255255255Enjoy!")
  57.     msg(type(TRANKTIME))
  58. end
  59.  
  60. addhook("say","sayCommands")
  61. function sayCommands(id,txt)
  62.     if string.sub(txt, 1, 5) == "!kick" then
  63.         if PlayerLevel(id) >= 15 then
  64.             local p, reason = string.match(txt, "!kick (%d+) (.+)")
  65.             if (p ~= nil) and (player(p,"exists")) then
  66.                 f = io.open("sys/lua/serverfiles/kicks.txt","a+")
  67.                 f:write("Kicked: "..player(p,"name").." - "..player(p,"usgn").." \n")
  68.                 f:write("Kicked by: "..player(id,"name").." "..player(id,"usgn").." \n")
  69.                 f:write("Reason: "..reason.." \n")
  70.                 f:write("Date: "..os.date("%x", os.time()).." \n\n")
  71.                 f:close()
  72.                 msg("©255255255"..player(id,"name").."©255125000 kicked ©255255255"..player(p,"name"))
  73.                 msg("©255125000Reason: ©255255255"..reason)
  74.                 parse("kick "..p)
  75.                 return 1
  76.             else
  77.                 msg2(id,"©255255255Please enter a valid ID and reason!")
  78.                 return 1
  79.             end
  80.         else
  81.             msg2(id,"255255255You are not allowed to use this command!")
  82.             return 1
  83.         end
  84.     elseif string.sub(txt, 1, 4) == "!ban" then
  85.         if PlayerLevel(id) >= 15 then
  86.             local p, reason = string.match(txt, "!ban (%d+) (.+)")
  87.             if (p ~= nil) and (player(p,"exists")) then
  88.                 f = io.open("sys/lua/serverfiles/bans.txt","a+")
  89.                 f:write("Banned: "..player(p,"name").." - "..player(p,"usgn").." \n")
  90.                 f:write("Banned by: "..player(id,"name").." "..player(id,"usgn").." \n")
  91.                 f:write("Reason: "..reason.." \n")
  92.                 f:write("Date: "..os.date("%x", os.time()).." \n\n")
  93.                 f:close()
  94.                 msg("©255255255"..player(id,"name").." ©255125000banned ©255255255"..player(p,"name"))
  95.                 msg("©255125000Reason: ©255255255"..reason)
  96.                 parse("banip "..p)
  97.                 parse("banusgn "..p)
  98.                 return 1
  99.             else
  100.                 msg2(id,"©255255255Please enter a valid ID and reason!")
  101.                 return 1
  102.             end
  103.         else
  104.             msg2(id,"©255255255You are not allowed to use this command!")
  105.             return 1
  106.         end
  107.     elseif string.sub(txt, 1, 5) == "!mute" then
  108.         if PlayerLevel(id) >= 10 then
  109.             local p, time, reason = string.match(txt, "!mute (%d+) (%d+) (.+)")
  110.             time = tonumber(time)
  111.             if (p ~= nil) and (player(p,"exists")) then
  112.                 if (time <= 60) then
  113.                     User[id]["muted"] = 1
  114.                     User[id]["muteEnd"] = os.clock() + time*60
  115.                     msg("©255255255"..player(p,"name").."©255125000 has been muted for "..time.." minute(s)")
  116.                     msg("©255125000Reason: ©255255255"..reason)
  117.                     return 1
  118.                 else
  119.                     msg2(id,"©255125000You can't mute someone for over 60 minutes!")
  120.                     return 1
  121.                 end
  122.             else
  123.                 msg2(id,"©255125000Please enter a valid id, time and reason!")
  124.                 return 1
  125.             end
  126.         else
  127.             msg2(id,"©255255255You are not allowed to use this command!")
  128.             return 1
  129.         end
  130.     elseif string.sub(txt, 1, 9) == "!speclock" then
  131.         if PlayerLevel(id) >= 15 then
  132.             local p, time, reason = string.match(txt, "!speclock (%d+) (%d+) (.+)")
  133.             time = tonumber(time)
  134.             if (p ~= nil) and (player(p,"exists")) then
  135.                 if (time <= 60) then
  136.                     parse("makespec "..p)
  137.                     User[id]["speclock"] = 1
  138.                     User[id]["speclockEnd"] = os.clock() + time*60
  139.                     msg("©255125000"..player(p,"name").." has been speclocked for "..time.." minute(s)")
  140.                     msg("©255125000Reason: ©255255255"..reason)
  141.                     return 1
  142.                 else
  143.                     msg2(id,"©255125000You can't speclock someone for over 60 minutes!")
  144.                     return 1
  145.                 end
  146.             else
  147.                 msg2(id,"©255125000Please enter a valid id, time and reason!")
  148.                 return 1
  149.             end
  150.         else
  151.             msg2(id,"©255255255You are not allowed to use this command!")
  152.             return 1
  153.         end
  154.     elseif string.sub(txt, 1, 3) == "!pm" then
  155.         local p, message = string.match(txt, "!pm (%d+) (.+)")
  156.         if (p ~= nil) and (player(p,"exists")) then
  157.             msg2(p,"©255125000[PM from] "..player(id,"name").." : ©255255000"..message)
  158.             msg2(id,"©255125000[PM to] "..player(p,"name").." : ©255255000"..message)
  159.             return 1
  160.         else
  161.             msg2(id,"©255255255Please enter a valid ID and message!")
  162.             return 1
  163.         end
  164.     elseif string.sub(txt, 1, 6) == "!bring" then
  165.         if PlayerLevel(id) >= 15 then
  166.             local p = string.match(txt, "!bring (%d+)")
  167.             if (p ~= nil) and (player(p,"exists")) then
  168.                 parse("setpos "..p.." "..player(id,"x").." "..player(id,"y"))
  169.                 return 1
  170.             else
  171.                 msg2(id,"©255255255Please enter a valid ID!")
  172.                 return 1
  173.             end
  174.         else
  175.             msg2(id,"©255255255You are not allowed to use this command!")
  176.             return 1
  177.         end
  178.     elseif string.sub(txt, 1, 5) == "!goto" then
  179.         if PlayerLevel(id) >= 15 then
  180.             local p = string.match(txt, "!goto (%d+)")
  181.             if (p ~= nil) and (player(p,"exists")) then
  182.                 parse("setpos "..id.." "..player(p,"x").." "..player(p,"y"))
  183.                 return 1
  184.             else
  185.                 msg2(id,"©255255255Please enter a valid ID!")
  186.                 return 1
  187.             end
  188.         else
  189.             msg2(id,"©255255255You are not allowed to use this command!")
  190.             return 1
  191.         end
  192.     elseif string.sub(txt, 1, 10) == "!servermsg" then
  193.         if PlayerLevel(id) >= 20 then
  194.             local text = string.match(txt,"!servermsg (.+)")
  195.             if (text ~= nil) then
  196.                 msg("©255125000[Server] ©255255255"..text)
  197.                 return 1
  198.             else
  199.                 msg2(id,"©255255255Please enter a message!")
  200.                 return 1
  201.             end
  202.         else
  203.             msg2(id,"©255255255You are not allowed to use this command!")
  204.             return 1
  205.         end
  206.     elseif string.sub(txt, 1, 7) == "!report" then
  207.         local p, report = string.match(txt, "!report (%d+) (.+)")
  208.         if (p ~= nil) and (player(p,"exists")) then
  209.             f = io.open("sys/lua/serverfiles/reports.txt","a+")
  210.             f:write("Reported player: "..player(p,"name").." "..player(p,"usgn").." \n")
  211.             f:write("Reported by: "..player(id,"name").." "..player(id,"usgn").." \n")
  212.             f:write("Reason: "..report.." \n")
  213.             f:write("Date: "..os.date("%x", os.time()).." \n\n")
  214.             f:close()
  215.             msg2(id,"©255255255Thank you for your report on "..player(p,"name"))
  216.             return 1
  217.         else
  218.             msg2(id,"©255125000Please enter a valid ID and reason!")
  219.             return 1
  220.         end
  221.     elseif string.sub(txt, 1, 8) == "!setrank" then
  222.         if PlayerLevel(id) >= 25 then
  223.             local p, level = string.match(txt, "!setrank (%d+) (%d+)")
  224.             if p and player(p, "exists") then
  225.                 if PlayerLevel(id) <= PlayerLevel(p) then
  226.                     msg2(id,"©255255255You are not allowed to change people's rank with same or higher rank as you!")
  227.                     return 1
  228.                 else
  229.                     User[p]["RANK"] = level
  230.                     msg2(id,"©255125000"..player(p, "name").."'s rank has been changed to "..level)
  231.                     msg2(p,"©255125000Your rank has been changed to "..level)
  232.                     return 1
  233.                 end
  234.             else
  235.                 msg2(id,"©255125000Please enter a valid ID and rank!")
  236.                 return 1
  237.             end
  238.         else
  239.             msg2(id,"©255255255You are not allowed to use this command!")
  240.             return 1
  241.         end
  242.     elseif string.sub(txt, 1, 6) == "!trank" then
  243.         if PlayerLevel(id) >= 25 then
  244.             local p, level, time = string.match(txt, "!trank (%d+) (%d+) (.+)")
  245.             p = tonumber(p)
  246.             if p and player(p,"exists") then
  247.                 if PlayerLevel(id) <= PlayerLevel(p) then
  248.                     msg2(id,"©255255255You are not allowed to change people's rank with same or higher rank as you!")
  249.                     return 1
  250.                 else
  251.                     User[p]["TRANK"] = level
  252.                     User[p]["TRANKTIME"] = os.time() + time*86400
  253.                     msg2(id,"©255125000You have set "..player(p,"name").."'s rank to "..level.." for "..time.." day(s)")
  254.                     msg2(p,"©255125000You rank has been set to "..level.." for "..time.." day(s)")
  255.                     return 1
  256.                 end
  257.             else
  258.                 msg2(id,"©255125000Please enter a valid ID, rank and time!")
  259.                 return 1
  260.             end
  261.         else
  262.             msg2(id,"©255255255You are not allowed to use this command!")
  263.             return 1
  264.         end
  265.     elseif string.sub(txt, 1, 4) == "!tag" then
  266.         if PlayerLevel(id) >= 5 then
  267.             if player_tag[id] ~= 1 then
  268.                 player_tag[id] = 1
  269.                 msg2(id,"©000125000Tag activated!")
  270.                 return 1
  271.             elseif player_tag[id] ~= 0 then
  272.                 player_tag[id] = 0
  273.                 msg2(id,"©128000000Tag deactivated!")
  274.                 return 1
  275.             end
  276.         else
  277.             msg2(id,"©255255255You are not allowed to use this command!")
  278.             return 1
  279.         end
  280.     elseif string.sub(txt, 1, 7) == "!script" then
  281.         msg2(id,"RD Administration Script")
  282.         msg2(id,"Made by RebornDuck (USGN: 18065)")
  283.         msg2(id,"Credits: EngiN33R and Starkkz")
  284.         return 1
  285.     elseif string.sub(txt, 1, 5) == "!rcon" then
  286.         if PlayerLevel(id) >= 25 then
  287.             local text = string.match(txt, "!rcon (.+)")
  288.             if (text ~= nil) then
  289.                 parse(text)
  290.                 return 1
  291.             else
  292.                 msg2(id,"©255125000Please enter a valid command!")
  293.                 return 1
  294.             end
  295.         else
  296.             msg2(id,"©255255255You are not allowed to use this command!")
  297.             return 1
  298.         end
  299.     elseif string.sub(txt, 1, 9) == "!editname" then
  300.         if PlayerLevel(id) >= 15 then
  301.             local p, name = string.match(txt, "!editname (%d+) (.+)")
  302.             p = tonumber(p)
  303.             if (p ~= nil) and (player(p,"exists")) then
  304.                 parse("setname "..p.." "..name)
  305.                 msg("©255255255Name changed by:©255255000 "..player(id,"name"))
  306.                 return 1
  307.             else
  308.                 msg2(id,"©255125000Please enter a valid ID, name and reason!")
  309.                 return 1
  310.             end
  311.         else
  312.             msg2(id,"©255255255You are not allowed to use this command!")
  313.             return 1
  314.         end
  315.     elseif string.sub(txt, 1, 5) == "!slap" then
  316.         if PlayerLevel(id) >= 15 then
  317.             local p = string.match(txt, "!slap (%d+)")
  318.             if (p ~= nil) and (player(p,"exists")) then
  319.                 parse("slap "..p)
  320.                 msg2(p,"©255255255You got slapped by ©255255000"..player(id,"name"))
  321.                 return 1
  322.             else
  323.                 msg2(id,"©255125000Please enter a valid ID!")
  324.                 return 1
  325.             end
  326.         else
  327.             msg2(id,"©255255255You are not allowed to use this command!")
  328.             return 1
  329.         end
  330.     elseif string.sub(txt, 1, 6) == "!check" then
  331.         if PlayerLevel(id) >= 10 then
  332.             local p = string.match(txt, "!check (%d+)")
  333.             p = tonumber(p)
  334.             if (p ~= nil) and (player(p,"exists")) then
  335.                 for _, id in pairs(player(0,"table")) do
  336.                     msg2(id,"©255255255Name: ©255255000"..player(p,"name"))
  337.                     msg2(id,"©255255255USGN: ©255255000"..player(p,"usgn"))
  338.                     msg2(id,"©255255255IP: ©255255000"..player(p,"ip"))
  339.                     if PlayerLevel(p) == 25 then
  340.                         msg2(id,"©255255255Rank:©255255000 Owner")
  341.                         return 1
  342.                     elseif PlayerLevel(p) == 20 then
  343.                         msg2(id,"©255255255Rank:©255255000 Admin")
  344.                         return 1
  345.                     elseif PlayerLevel(p) == 15 then
  346.                         msg2(id,"©255255255Rank:©255255000 Moderator")
  347.                         return 1
  348.                     elseif PlayerLevel(p) == 10 then
  349.                         msg2(id,"©255255255Rank:©255255000 Donator")
  350.                         return 1
  351.                     elseif PlayerLevel(p) == 5 then
  352.                         msg2(id,"©255255255Rank:©255255000 VIP")
  353.                         return 1
  354.                     elseif PlayerLevel(p) == 0 then
  355.                         msg2(id,"©255255255Rank:©255255000 Player")
  356.                         return 1
  357.                     end
  358.                     return 1
  359.                 end
  360.             else
  361.                 msg2(id,"©255125000Please enter a valid ID!")
  362.                 return 1
  363.             end
  364.         else
  365.             msg2(id,"©255255255You are not allowed to use this command!")
  366.             return 1
  367.         end
  368.     elseif string.sub(txt, 1, 11) == "!playerrank" then
  369.         local p = string.match(txt, "!playerrank (%d+)")
  370.         p = tonumber(p)
  371.         if (p ~= nil) and (player(p, "exists")) then
  372.             for _, id in pairs(player(0,"table")) do
  373.                 msg2(id,"©255255255Player name: ©255255000"..player(p,"name"))
  374.                 if PlayerLevel(p) == 25 then
  375.                     msg2(id,"©255255255Player rank: ©255255000Owner")
  376.                     return 1
  377.                 elseif PlayerLevel(p) == 20 then
  378.                     msg2(id,"©255255255Player rank: ©255255000Admin")
  379.                     return 1
  380.                 elseif PlayerLevel(p) == 15 then
  381.                     msg2(id,"©255255255Player rank: ©255255000Moderator")
  382.                     return 1
  383.                 elseif PlayerLevel(p) == 10 then
  384.                     msg2(id,"©255255255Player rank: ©255255000Donator")
  385.                     return 1
  386.                 elseif PlayerLevel(p) == 5 then
  387.                     msg2(id,"©255255255Player rank: ©255255000VIP")
  388.                     return 1
  389.                 elseif PlayerLevel(p) == 0 then
  390.                     msg2(id,"©255255255Player rank: ©255255000Player")
  391.                     return 1
  392.                 end
  393.                 return 1
  394.             end
  395.         else
  396.             msg2(id,"©255125000Please enter a valid ID!")
  397.             return 1
  398.         end
  399.     elseif string.sub(txt, 1, 8) == "!restart" then
  400.         if PlayerLevel(id) >= 15 then
  401.             parse("restart")
  402.             return 1
  403.         else
  404.             msg2(id,"©255255255You are not allowed to use this command!")
  405.             return 1
  406.         end
  407.     elseif string.sub(txt, 1, 5) == "!help" then
  408.         if PlayerLevel(id) == 25 then
  409.             msg2(id,"©255255255!lua ©255255000- Parse lua.")
  410.             msg2(id,"©255255255!kick ©255255000- Kick a player from the server.")
  411.             msg2(id,"©255255255!ban ©255255000- Ban a player from the server.")
  412.             msg2(id,"©255255255!mute ©255255000- Mute a player for a period of time.")
  413.             msg2(id,"©255255255!speclock ©255255000- Lock someone as a spectator for a period of time.")
  414.             msg2(id,"©255255255!pm ©255255000- Send a private message to someone in the server.")
  415.             msg2(id,"©255255255!servermsg ©255255000- Write a message to the whole server.")
  416.             msg2(id,"©255255255!report ©255255000- Report someone.")
  417.             msg2(id,"©255255255!goto ©255255000- Teleport to someone else.")
  418.             msg2(id,"©255255255!bring ©255255000- Bring another player to you.")
  419.             msg2(id,"©255255255!setrank ©255255000- Give someone a new rank.")
  420.             msg2(id,"©255255255!trank ©255255000- Give someone a temporary rank.")
  421.             msg2(id,"©255255255!tag ©255255000- Activate/Deactivate your name tag.")
  422.             msg2(id,"©255255255!slap ©255255000- Slap someone's butt.")
  423.             msg2(id,"©255255255!restart ©255255000- Restart the game.")
  424.             msg2(id,"©255255255!script ©255255000- Information about the script.")
  425.             msg2(id,"©255255255!rcon ©255255000- Execute a rcon command.")
  426.             msg2(id,"©255255255!editname ©255255000- Change someone's name.")
  427.             msg2(id,"©255255255!check ©255255000- Check a players USGN ID, IP, rank and name.")
  428.             msg2(id,"©255255255!playerrank ©255255000- See what rank someone is.")
  429.             msg2(id,"©255255255F2 ©255255000- Teleport to your pointer.")
  430.             return 1
  431.         elseif PlayerLevel(id) == 20 then
  432.             msg2(id,"©255255255!kick ©255255000- Kick a player from the server.")
  433.             msg2(id,"©255255255!ban ©255255000- Ban a player from the server.")
  434.             msg2(id,"©255255255!mute ©255255000- Mute a player for a period of time.")
  435.             msg2(id,"©255255255!speclock ©255255000- Lock someone as a spectator for a period of time.")
  436.             msg2(id,"©255255255!pm ©255255000- Send a private message to someone in the server.")
  437.             msg2(id,"©255255255!servermsg ©255255000- Write a message to the whole server.")
  438.             msg2(id,"©255255255!report ©255255000- Report someone.")
  439.             msg2(id,"©255255255!goto ©255255000- Teleport to someone else.")
  440.             msg2(id,"©255255255!bring ©255255000- Bring another player to you.")
  441.             msg2(id,"©255255255!tag ©255255000- Activate/Deactivate your name tag.")
  442.             msg2(id,"©255255255!slap ©255255000- Slap someone's butt.")
  443.             msg2(id,"©255255255!restart ©255255000- Restart the game.")
  444.             msg2(id,"©255255255!script ©255255000- Information about the script.")
  445.             msg2(id,"©255255255!editname ©255255000- Change someone's name.")
  446.             msg2(id,"©255255255!check ©255255000- Check a players USGN ID, IP, rank and name.")
  447.             msg2(id,"©255255255!playerrank ©255255000- See what rank someone is.")
  448.             msg2(id,"©255255255F2 ©255255000- Teleport to your pointer.")
  449.             return 1
  450.         elseif PlayerLevel(id) == 15 then
  451.             msg2(id,"©255255255!kick ©255255000- Kick a player from the server.")
  452.             msg2(id,"©255255255!ban ©255255000- Ban a player from the server.")
  453.             msg2(id,"©255255255!mute ©255255000- Mute a player for a period of time.")
  454.             msg2(id,"©255255255!speclock ©255255000- Lock someone as a spectator for a period of time.")
  455.             msg2(id,"©255255255!pm ©255255000- Send a private message to someone in the server.")
  456.             msg2(id,"©255255255!report ©255255000- Report someone.")
  457.             msg2(id,"©255255255!goto ©255255000- Teleport to someone else.")
  458.             msg2(id,"©255255255!bring ©255255000- Bring another player to you.")
  459.             msg2(id,"©255255255!tag ©255255000- Activate/Deactivate your name tag.")
  460.             msg2(id,"©255255255!slap ©255255000- Slap someone's butt.")
  461.             msg2(id,"©255255255!restart ©255255000- Restart the game.")
  462.             msg2(id,"©255255255!script ©255255000- Information about the script.")
  463.             msg2(id,"©255255255!editname ©255255000- Change someone's name.")
  464.             msg2(id,"©255255255!check ©255255000- Check a players USGN ID, IP, rank and name.")
  465.             msg2(id,"©255255255!playerrank ©255255000- See what rank someone is.")
  466.             return 1
  467.         elseif PlayerLevel(id) == 10 then
  468.             msg2(id,"©255255255!mute ©255255000- Mute a player for a period of time.")
  469.             msg2(id,"©255255255!pm ©255255000- Send a private message to someone in the server.")
  470.             msg2(id,"©255255255!report ©255255000- Report someone.")
  471.             msg2(id,"©255255255!tag ©255255000- Activate/Deactivate your name tag.")
  472.             msg2(id,"©255255255!script ©255255000- Information about the script.")
  473.             msg2(id,"©255255255!check ©255255000- Check a players USGN ID, IP, rank and name.")
  474.             msg2(id,"©255255255!playerrank ©255255000- See what rank someone is.")
  475.             return 1
  476.         elseif PlayerLevel(id) == 5 then
  477.             msg2(id,"©255255255!pm ©255255000- Send a private message to someone in the server.")
  478.             msg2(id,"©255255255!report ©255255000- Report someone.")
  479.             msg2(id,"©255255255!tag ©255255000- Activate/Deactivate your name tag.")
  480.             msg2(id,"©255255255!script ©255255000- Information about the script.")
  481.             msg2(id,"©255255255!playerrank ©255255000- See what rank someone is.")
  482.             return 1
  483.         elseif PlayerLevel(id) == 0 then
  484.             msg2(id,"©255255255!pm ©255255000- Send a private message to someone in the server.")
  485.             msg2(id,"©255255255!report ©255255000- Report someone.")
  486.             msg2(id,"©255255255!script ©255255000- Information about the script.")
  487.             msg2(id,"©255255255!playerrank ©255255000- See what rank someone is.")
  488.             return 1
  489.         end    
  490.     elseif string.sub(txt, 1, 1) == "!" then
  491.         msg2(id,"©255125000Unknown command!")
  492.         return 1
  493.     elseif player_tag[id] then
  494.         if PlayerLevel(id) == 25 then
  495.             if player(id,"team") == 1 then
  496.                 msg("©255000000(Owner) "..player(id,"name").."©255255000: "..txt)
  497.                 return 1
  498.             elseif player(id,"team") == 2 then
  499.                 msg("©000128255(Owner) "..player(id,"name").."©255255000: "..txt)
  500.                 return 1
  501.             elseif player(id,"team") == 0 then
  502.                 msg("©128128128(Owner) "..player(id,"name").."©255255000: "..txt)
  503.                 return 1
  504.             end
  505.         elseif PlayerLevel(id) == 20 then
  506.             if player(id,"team") == 1 then
  507.                 msg("©255000000(Admin) "..player(id,"name").."©255255000: "..txt)
  508.                 return 1
  509.             elseif player(id,"team") == 2 then
  510.                 msg("©000128255(Admin) "..player(id,"name").."©255255000: "..txt)
  511.                 return 1
  512.             elseif player(id,"team") == 0 then
  513.                 msg("©128128128(Admin) "..player(id,"name").."©255255000: "..txt)
  514.                 return 1
  515.             end
  516.         elseif PlayerLevel(id) == 15 then
  517.             if player(id,"team") == 1 then
  518.                 msg("©255000000(Mod) "..player(id,"name").."©255255000: "..txt)
  519.                 return 1
  520.             elseif player(id,"team") == 2 then
  521.                 msg("©000128255(Mod) "..player(id,"name").."©255255000: "..txt)
  522.                 return 1
  523.             elseif player(id,"team") == 0 then
  524.                 msg("©128128128(Mod) "..player(id,"name").."©255255000: "..txt)
  525.                 return 1
  526.             end
  527.         elseif PlayerLevel(id) == 10 then
  528.             if player(id,"team") == 1 then
  529.                 msg("©255000000(Donator) "..player(id,"name").."©255255000: "..txt)
  530.                 return 1
  531.             elseif player(id,"team") == 2 then
  532.                 msg("©000128255(Donator) "..player(id,"name").."©255255000: "..txt)
  533.                 return 1
  534.             elseif player(id,"team") == 0 then
  535.                 msg("©128128128(Donator) "..player(id,"name").."©255255000: "..txt)
  536.                 return 1
  537.             end
  538.         elseif PlayerLevel(id) == 5 then
  539.             if player(id,"team") == 1 then
  540.                 msg("©255000000(VIP) "..player(id,"name").."©255255000: "..txt)
  541.                 return 1
  542.             elseif player(id,"team") == 2 then
  543.                 msg("©000128255(VIP) "..player(id,"name").."©255255000: "..txt)
  544.                 return 1
  545.             elseif player(id,"team") == 0 then
  546.                 msg("©128128128(VIP) "..player(id,"name").."©255255000: "..txt)
  547.                 return 1
  548.             end
  549.         end
  550.     end
  551.     User(id)["muted"] = false
  552.     if os.clock - User[id]["muteEnd"] > 0 then
  553.         User[id]["muted"] = 0
  554.     elseif os.clock() - User[id]["speclockEnd"] > 0 then
  555.         User[id]["speclock"] = 0
  556.     end
  557.     if User[id]["muted"] == true and User[id]["muteEnd"] < 0 then
  558.         return 1
  559.     end
  560. end
  561.  
  562. addhook("team","TeamHook")
  563. function TeamHook(id,team)
  564.     if User[id]["speclock"] and os.clock() - User[id]["speclockEnd"] < 0 then
  565.         if team == 0 then
  566.             return 0
  567.         else
  568.             parse("makespec "..id)
  569.             msg2(id,"©255255255You are speclocked!")
  570.             return 1
  571.         end
  572.     end
  573. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement