Advertisement
Guest User

Script

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