Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------------------------------------------
- -- MIX ADMIN SCRIPT --
- -- BY : Lawless --
- -- USGN: 4823 --
- ------------------------------------------------------------------------------------------
- pl = {}
- -- Administrators --
- owner = {23882,154130,4823,166404,31341,9929} -- Owner has GM tag, but has an !rcon command. I added this since rcon is very powerful (crashing server etc).
- gamemaster = {} --Put your USGN here
- supermod = {14686}
- mod = {} -- Moderator USGN here
- vip = {} -- VIP USGN here.
- viplus = {} -- Super VIP.
- color = { -- You can change this, or add some extra colors. Note: the last color mustn't have "," behind it! "\169" is a copyright icon.
- "\169255220000", -- CS2D (yellow) 1
- "\169255255255", -- white 2
- "\169255000000", -- red 3
- "\169000255000", -- green 4
- "\169000000255", -- blue 5
- "\169220220220", -- light grey 6
- "\169064179162", -- PM - light blue 7
- "\169255025000", -- T 8
- "\169050150255", -- CT 9
- "\169100100100", -- pretty dark grey - tag 10
- "\169153255051", -- Pretty Green color - 11
- "\169255102102", -- 12
- "\169178255102", -- 13
- "\169255153153" -- 14
- },
- -- HOOKS --
- addhook("join","_join")
- addhook("say","_says")
- addhook("clientdata","_clientdata")
- addhook("startround","_startround")
- -- FUNCS --
- function _join(id) -- No need to change anything here
- pl[id] = {}
- pl[id].lvl = 1
- pl[id].status = "Player"
- pl[id].name = player(id,"name")
- pl[id].usgn = player(id,"usgn")
- pl[id].ip = player(id,"ip")
- pl[id].muted = false
- for _, usgn in ipairs(owner) do
- if player(id,"usgn")==usgn then
- pl[id].lvl = 15
- pl[id].status = "Super Administrator"
- pl[id].tag = ">+Admin <" --Same tag
- pl[id].has_tag = true
- end
- end
- for _, usgn in ipairs(gamemaster) do
- if player(id,"usgn")==usgn then
- pl[id].lvl = 10
- pl[id].status = "Administrator"
- pl[id].tag = ">Admin <"
- pl[id].has_tag = true
- end
- end
- for _, usgn in ipairs(mod) do
- if player(id,"usgn")==usgn then
- pl[id].lvl = 5
- pl[id].status = "Moderator"
- pl[id].tag = ">Moderator <"
- pl[id].has_tag = true
- end
- end
- for _, usgn in ipairs(vip) do
- if player(id,"usgn")==usgn then
- pl[id].lvl = 2
- pl[id].status = "V.I.P"
- pl[id].tag = ">VIP <"
- pl[id].has_tag = true
- end
- end
- for _, usgn in ipairs(viplus) do
- if player(id,"usgn")==usgn then
- pl[id].lvl = 3
- pl[id].status = "Super V.I.P"
- pl[id].tag = ">+VIP <"
- pl[id].has_tag = true
- end
- end
- for _, usgn in ipairs(supermod) do
- if player(id,"usgn")==usgn then
- pl[id].lvl = 6
- pl[id].status = "Super Moderator"
- pl[id].tag = ">+Moderator <"
- pl[id].has_tag = true
- end
- end
- welcome(id)
- end
- function welcome(id)
- msg2(id,color[1].."Welcome to the aM Server")
- msg2(id,color[1].."Visit us at \169000255000www.am2d.net")
- msg2(id,color[1].."This server is powered by Aftermath Alpha Script V0.2")
- msg2(id,color[1].."To register and access more of the server, type @register name pass")
- msg2(id,color[1].."To login, type in @login uname password")
- msg2(id,color[1].."Type @help or ? for a list of commands")
- msg2(id,color[1].."Type @broadcast to announce an important message.")
- if pl[id].usgn==1 then
- msg2(id,color[3].."")
- elseif pl[id].usgn==1 then
- elseif pl[id].lvl >= 2 then
- msg2(id,color[1].."Logged in as a \169000255000"..pl[id].tag.."\169255220000.")
- end
- end
- function error(id,txt,error)
- if error==1 then
- msg2(id,color[3].."Error, not enough privileges!")
- elseif error==2 then
- msg2(id,color[3].."Error, no players known with the I.D. "..t)
- elseif error==3 then
- msg2(id,color[3].."Error, bots are not banable")
- elseif error==4 then
- msg2(id,color[3].."Error, you have been muted, therefore you cannot talk")
- elseif error==5 then
- msg2(id,color[3].."Error, value is too high. 1-10 allowed")
- elseif error==6 then
- msg2(id,color[3].."Error, you don't own a score to reset")
- elseif error==7 then
- msg2(id,color[3].."Error, value is too high. 1-60 allowed")
- elseif error==8 then
- msg2(id,color[3].."Error, player has not been muted")
- elseif error==9 then
- msg2(id,color[3].."Error, muted ID "..t)
- elseif error==10 then
- msg2(id,""..color[3].."Error, bots cannot be muted")
- elseif error==11 then
- msg2(id,""..color[3].."Error, can't silence bots")
- elseif error==12 then
- msg2(id,""..color[3].."Error, bots doesn't have any information(s) granted")
- elseif error==13 then
- msg2(id,""..color[3].."Error, value is too high. 1-7 allowed")
- elseif error==14 then
- msg2(id,""..color[3].."Error, value is too high. 1-20 allowed")
- elseif error==15 then
- msg2(id,""..color[3].."Error, value is too high. 1-3 allowed")
- end
- end
- function _says(id,txt)
- if pl[id].muted == true then
- error(id,txt,4)
- return 1
- end
- if (txt == "rank") then
- return 0
- end
- if txt:sub(1,5)=="@kick" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(7,8))
- local r = txt:sub(9)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @kick a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- parse('kick '..t..' "'..r)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@kick")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,4)=="@ban" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(6,7))
- r = txt:sub(10)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @ban a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- if player(t,"bot")==true then error(id,txt,3) return 1 end
- parse('banip '..player(t,"ip")..' 0 "'..r)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@ban")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,6)=="@busgn" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(8,9))
- r = txt:sub(11)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @busgn a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- if player(t,"bot")==true then error(id,txt,3) return 1 end
- parse('banusgn '..player(t,"usgn")..' 0 "'..r)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@busgn")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,8)=="@tempban" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(10,11))
- duration = txt:sub(12,14)
- r = txt:sub(15)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @tempban a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- if player(t,"bot")==true then error(id,txt,3) return 1 end
- if tonumber(duration) > 60 then error(id,txt,7) return 1 end
- msg(color[11]..""..color[9]..""..pl[id].name.." used"..color[11].." @tempban")
- if player(t,"usgn")==0 then
- msg2(id,color[4]..""..color[2]..""..player(t,"name").." was not logged in to USGN.")
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@tempban")
- parse('banip '..player(t,"ip")..' '..duration..' "'..r)
- return 1
- else
- parse('banusgn '..player(t,"usgn")..' '..duration..' "'..r)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt=="@public" then
- if pl[id].lvl >= 5 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@public")
- parse("sv_msg \169255220000public settings: ©000255000ENABLED@C")
- parse("restartround")
- parse("sv_fow 0")
- parse("mp_startmoney 16000")
- parse("mp_roundtime 2")
- parse("mp_buytime 100000")
- parse("mp_freezetime 2")
- parse("sv_specmode 1")
- parse("sv_password")
- parse("sv_msg ©000255000$16000: | RT: 2 | Fow: Disabled | FT: 3 | No Pass | Usgnonly: Disable")
- parse("sv_name aM' » Gaming")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt=="@mix" then
- if pl[id].lvl >= 5 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@mix")
- parse("sv_msg \169255220000mix settings: ©000255000ENABLED@C")
- parse("sv_msg ©255255255Get ready for the mix@C")
- parse("sv_msg ©255000000GL ©255255255& ©255000000 HF!@C")
- parse("sv_msg ©000255000LIVE!@C")
- parse("sv_fow 1")
- parse("mp_startmoney 800")
- parse("mp_roundtime 2")
- parse("sv_name aM' » mixteam")
- parse("sv_password match")
- parse("mp_buytime 0.25")
- parse("mp_freezetime 7")
- parse("sv_specmode 2")
- parse("mp_pinglimit 0")
- parse("restartround")
- parse("sv_msg ©000255000$800: | RT: 2 | Fow: Enabled | FT: 7 | Password: match | Usgnonly: Enabled")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,6)=="@unban" then
- if pl[id].lvl >= 10 then
- mask = txt:sub(8)
- parse("unban "..mask)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@unban")
- msg2(id,color[1].."You have unbanned: "..color[1]..""..mask)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt=="@live" then
- if pl[id].lvl >= 10 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@live")
- parse("sv_msg ©255255255Get ready for the mix@C")
- parse("sv_fow 1")
- parse("mp_startmoney 800")
- parse("mp_roundtime 2")
- parse("mp_buytime 0.25")
- parse("mp_freezetime 7")
- parse("sv_specmode 2")
- parse("mp_pinglimit 0")
- parse("mp_maxclientsip 1")
- parse("sv_maxplayers 16")
- parse("mp_autoteambalance 0")
- parse("mp_kickpercent 0.0")
- parse("transfer_speed 250")
- parse("mp_damagefactor 1.0")
- parse("sv_maptransfer 1")
- parse("mp_antispeeder 0")
- parse("mp_postspawn 0")
- parse("mp_maxrconfails 5")
- parse("sv_friendlyfire 0")
- parse("mp_smokeblock 1")
- parse("restartround")
- parse("sv_msg ©255000000GL ©255255255& ©255000000 HF!@C")
- parse("sv_msg ©000255000LIVE!@C")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,5)=="@mute" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(7,8))
- reason = txt:sub(9)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @mute a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- if player(t,"bot")==true then error(id,txt,10) return 1 end
- if pl[t].muted==false then
- pl[t].muted=true
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@mute")
- return 1
- else
- pl[t].muted=true
- error(id,txt,9)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,5)=="@kill" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(7,8))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @kill a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- parse("killplayer "..t)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@kill")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,5)=="@slap" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(7,8))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @slap a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@slap")
- parse("slap "..t)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,6)=="@equip" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(8,9))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @equip a administration member.")
- return 1
- end
- item = tonumber(txt:sub(10,12))
- parse("equip "..t.." "..item)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@equip")
- msg2(t,color[1]..""..pl[id].name.." gave you item \169000255000#"..item)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,6)=="@strip" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(8,9))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @strip a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@strip")
- parse("strip "..t)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,6)=="@maket" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(8,9))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @maket a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@maket")
- parse("maket "..t)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,7)=="@makect" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(9,10))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @makect a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@makect")
- parse("makect "..t)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,9)=="@makespec" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(11,12))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @makespec a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@makespec")
- parse("makespec "..t)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,9)=="@speedmod" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(11,12))
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @speedmod a administration member.")
- return 1
- end
- speed = tonumber(txt:sub(14,15))
- parse("speedmod "..t.." "..speed)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@speedmod")
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,7)=="@unmute" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(9,10))
- reason = txt:sub(10)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @unmute a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- if player(t,"bot")==true then error(id,txt,11) return 1 end
- if pl[t].muted==false then
- pl[t].muted=false
- error(id,txt,8)
- return 1
- else
- pl[t].muted=false
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@unmute")
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,6)=="@whois" then
- if pl[id].lvl >= 10 then
- t = tonumber(txt:sub(8,9))
- if not player(t,"exists") then error(id,txt,2) return 1 end
- if player(t,"bot")==true then error(id,txt,12) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@whois")
- msg2(id,color[1].."Username:\169153255051 "..pl[t].name)
- msg2(id,color[1].."US I.D:\169153255051 "..pl[t].usgn)
- msg2(id,color[1].."Internet Protocol:\169153255051 "..pl[t].ip)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,4)=="@map" then
- if pl[id].lvl >= 5 then
- map = txt:sub(6)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@map")
- parse("map "..map)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,7)=="@svname" then
- if pl[id].lvl >= 10 then
- name = txt:sub(9)
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@svname")
- parse("sv_name "..name)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,4)=="@fow" then
- if pl[id].lvl >= 10 then
- local t = tonumber(txt:sub(6,7))
- if t <=4 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@fow")
- parse("sv_fow "..t)
- return 1
- else
- error(id,txt,5)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt=="@say" then
- if pl[id].lvl >= 5 then
- if pl[id].has_tag == true then
- pl[id].has_tag = false
- msg2(id,color[1]..">>>TAG IS OFF<<<")
- return 1
- else
- pl[id].has_tag = true
- msg2(id,color[1]..">>>TAG IS ON<<<")
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,8)=="@restart" then --!restart 99
- if pl[id].lvl >= 5 then
- local t = tonumber(txt:sub(10,11))
- if t <=10 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@restart")
- parse("restartround "..t)
- return 1
- else
- error(id,txt,5)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,11)=="@freezetime" then --freezetime
- if pl[id].lvl >= 5 then
- local t = tonumber(txt:sub(13,14))
- if t <=7 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@freezetime")
- parse("mp_freezetime "..t)
- return 1
- else
- error(id,txt,13)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,3)=="@ft" then --freezetime
- if pl[id].lvl >= 5 then
- local t = tonumber(txt:sub(5,6))
- if t <=7 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@ft")
- parse("mp_freezetime "..t)
- return 1
- else
- error(id,txt,13)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,8)=="@setname" then
- if pl[id].lvl >= 5 then
- t = tonumber(txt:sub(10,11))
- name = txt:sub(12)
- if pl[t].lvl >= 10 then
- msg2(id, "\169255000000Error, can't @setname a administration member.")
- return 1
- end
- if not player(t,"exists") then error(id,txt,2) return 1 end
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@setname")
- parse("setname "..t.." "..name)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,8)=="@infammo" then --freezetime
- if pl[id].lvl >= 5 then
- local t = tonumber(txt:sub(10,11))
- if t <=7 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@infammo")
- parse("mp_infammo "..t)
- return 1
- else
- error(id,txt,15)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,10)=="@roundtime" then -- roundtime
- if pl[id].lvl >= 5 then
- local t = tonumber(txt:sub(12,13))
- if t <=20 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@roundtime")
- parse("mp_roundtime "..t)
- return 1
- else
- error(id,txt,14)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,3)=="@rt" then -- roundtime
- if pl[id].lvl >= 5 then
- local t = tonumber(txt:sub(5,6))
- if t <=20 then
- msg(color[9]..""..player(id,"name").." "..color[9].."used: "..color[11].."@rt")
- parse("mp_roundtime "..t)
- return 1
- else
- error(id,txt,14)
- return 1
- end
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt:sub(1,5)=="@rcon" then
- if pl[id].lvl >= 15 then
- local cmd = txt:sub(7)
- msg(">>>RCON<<<")
- msg(color[1]..""..cmd)
- parse(cmd)
- return 1
- else
- error(id,txt,1)
- return 1
- end
- end
- if txt=="@rs" then
- if player(id,"deaths") > 0 or player(id,"score") > 0 then
- parse("setscore "..id.." 0")
- parse("setdeaths "..id.." 0")
- msg(color[9]..""..color[9]..""..player(id,"name").." used"..color[11].." @rs")
- return 1
- else
- error(id,txt,6)
- return 1
- end
- end
- if txt=="@rS" then
- if player(id,"deaths") > 0 or player(id,"score") > 0 then
- parse("setscore "..id.." 0")
- parse("setdeaths "..id.." 0")
- msg(color[9]..""..color[9]..""..player(id,"name").." used"..color[11].." @rS")
- return 1
- else
- error(id,txt,6)
- return 1
- end
- end
- if txt=="@Rs" then
- if player(id,"deaths") > 0 or player(id,"score") > 0 then
- parse("setscore "..id.." 0")
- parse("setdeaths "..id.." 0")
- msg(color[9]..""..color[9]..""..player(id,"name").." used"..color[11].." @Rs")
- return 1
- else
- error(id,txt,6)
- return 1
- end
- end
- if txt=="@RS" then
- if player(id,"deaths") > 0 or player(id,"score") > 0 then
- parse("setscore "..id.." 0")
- parse("setdeaths "..id.." 0")
- msg(color[9]..""..color[9]..""..player(id,"name").." used"..color[11].." @RS")
- return 1
- else
- error(id,txt,6)
- return 1
- end
- end
- if txt=="@resetscore" then
- if player(id,"deaths") > 0 or player(id,"score") > 0 then
- parse("setscore "..id.." 0")
- parse("setdeaths "..id.." 0")
- msg(color[9]..""..color[9]..""..player(id,"name").." used"..color[11].." @resetscore")
- return 1
- else
- error(id,txt,6)
- return 1
- end
- end
- if txt=="@RESETSCORE" then
- if player(id,"deaths") > 0 or player(id,"score") > 0 then
- parse("setscore "..id.." 0")
- parse("setdeaths "..id.." 0")
- msg(color[9]..""..color[9]..""..player(id,"name").." used"..color[11].." @resetscore")
- return 1
- else
- error(id,txt,6)
- return 1
- end
- end
- if txt=="@help" then
- msg2(id,color[1]..">>>LIST OF COMMANDS<<<")
- msg2(id,color[1].."Open up your console so you can see the commands in a greater view.")
- msg2(id,color[1].."@help < see the list of commands.")
- msg2(id,color[1].."@rs / @resetscore < resets your whole score, including deaths.")
- if pl[id].lvl >= 1 then
- msg2(id,color[1].."@mix < sets up the server for a mix match.")
- msg2(id,color[1].."@public < sets up the server for a public section.")
- msg2(id,color[1].."@say < enable or disable your tag.")
- msg2(id,color[1].."@kick <id> <reason>")
- msg2(id,color[1].."@slap <id>")
- msg2(id,color[1].."@speedmod <id> <value>")
- msg2(id,color[1].."@kill <id>")
- msg2(id,color[1].."@makect <id>")
- msg2(id,color[1].."@maket <id>")
- msg2(id,color[1].."@makespec <id>")
- msg2(id,color[1].."@specmode <id>")
- msg2(id,color[1].."@svname <name>")
- msg2(id,color[1].."@setname <id> <name>")
- msg2(id,color[1].."@equip <id> <item number>")
- msg2(id,color[1].."@infammo <value>")
- msg2(id,color[1].."@banip <id> <reason>")
- msg2(id,color[1].."@roundtime / @rt <time>")
- msg2(id,color[1].."@busgn <id> <reason>")
- msg2(id,color[1].."@tempban <id> <duration (1-1440 minutes)> <reason>")
- msg2(id,color[1].."@mute <id> <reason>")
- msg2(id,color[1].."@whois <id>")
- msg2(id,color[1].."@restart <time>")
- msg2(id,color[1].."@freezetime / @ft <time>")
- msg2(id,color[1].."@live <time>")
- msg2(id,color[1].."@fow <value>")
- msg2(id,color[1].."@unban <mask>")
- msg2(id,color[1].."@map <map>")
- msg2(id,color[1].."@rcon <cmd>")
- end
- if pl[id].lvl==15 then
- msg2(id,color[1].."")
- end
- return 1
- end
- if txt=="?" then
- msg2(id,color[1]..">>>LIST OF COMMANDS<<<")
- msg2(id,color[1].."Open up your console so you can see the commands in a greater view.")
- msg2(id,color[1].."@help / ? < see the list of commands.")
- msg2(id,color[1].."@rs / @resetscore < resets your whole score, including deaths.")
- if pl[id].lvl >= 1 then
- msg2(id,color[1].."@mix < sets up the server for a mix match.")
- msg2(id,color[1].."@public < sets up the server for a public section.")
- msg2(id,color[1].."@say < enable or disable your tag.")
- msg2(id,color[1].."@kick <id> <reason>")
- msg2(id,color[1].."@slap <id>")
- msg2(id,color[1].."@speedmod <id> <value>")
- msg2(id,color[1].."@kill <id>")
- msg2(id,color[1].."@makect <id>")
- msg2(id,color[1].."@maket <id>")
- msg2(id,color[1].."@makespec <id>")
- msg2(id,color[1].."@specmode <id>")
- msg2(id,color[1].."@svname <name>")
- msg2(id,color[1].."@setname <id> <name>")
- msg2(id,color[1].."@equip <id> <item number>")
- msg2(id,color[1].."@infammo <value>")
- msg2(id,color[1].."@banip <id> <reason>")
- msg2(id,color[1].."@roundtime / @rt <time>")
- msg2(id,color[1].."@busgn <id> <reason>")
- msg2(id,color[1].."@tempban <id> <duration (1-1440 minutes)> <reason>")
- msg2(id,color[1].."@mute <id> <reason>")
- msg2(id,color[1].."@whois <id>")
- msg2(id,color[1].."@restart <time>")
- msg2(id,color[1].."@freezetime / @ft <time>")
- msg2(id,color[1].."@live <time>")
- msg2(id,color[1].."@fow <value>")
- msg2(id,color[1].."@unban <mask>")
- msg2(id,color[1].."@map <map>")
- msg2(id,color[1].."@rcon <cmd>")
- end
- if pl[id].lvl==15 then
- msg2(id,color[1].."")
- end
- return 1
- end
- if txt=="@" then
- msg2(id,color[3].."Unknown command. Say @help to get information of server's commands")
- return 1
- end
- if pl[id].lvl >= 2 and pl[id].has_tag == true then
- if player(id,"team")==1 then
- msg(color[8]..""..player(id,"name").." ©000255000"..pl[id].tag..""..color[8]..": "..color[1]..""..txt) -- tag
- return 1
- elseif player(id,"team")==2 then
- msg(color[9]..""..player(id,"name").." ©000255000"..pl[id].tag..""..color[9]..": "..color[1]..""..txt)
- return 1
- elseif player(id,"team")==0 then
- msg(color[1]..""..player(id,"name").." ©000255000"..pl[id].tag..""..color[1]..": "..color[1]..""..txt)
- return 1
- end
- end
- end
- function _startround(id)
- if sv_gamemode==0 and mp_startmoney==16000 then
- for i = 1,32 do
- parse("setmoney "..i.." 16000")
- end
- end
- end
- ------------------------------------------------------------------------------------------
- -- DAMAGE ROUNDS --
- -- BY : Scott --
- -- USGN: 154130 --
- ------------------------------------------------------------------------------------------
- function initArray(m)
- local array = {}
- for i=1,m do
- array[i] = 0
- end
- return array
- end
- damage = {}
- dmg = initArray(32)
- total = initArray(32)
- addhook("startround","damage.startround")
- function damage.startround()
- for _,id in pairs(player(0,"table")) do
- dmg[id] = 0
- end
- end
- addhook("leave","damage.leave")
- function damage.leave(id)
- dmg[id] = 0
- total[id] = 0
- end
- addhook("hit","damage.hit")
- function damage.hit(id,source,weapon,hpdmg)
- if source == 0 then
- return false
- end
- if player(source,"team") == player(id,"team") then
- return false
- end
- dmg[source] = dmg[source] + hpdmg
- end
- addhook("endround","damage.endround")
- function damage.endround(mode)
- playerlist = player(0,"table")
- if mode >= 3 and mode <= 5 then
- for _,id in pairs(playerlist) do
- total[id] = 0
- end
- return false
- end
- local max_val,key =- math.huge
- for k,v in pairs(dmg) do
- if v > max_val then
- max_val,key = v,k
- end
- end
- if max_val == 0 then
- return false
- end
- for _,id in pairs(playerlist) do
- total[id] = total[id] + dmg[id]
- msg2(id,"\169255220000\169255220000 "..player(key,"name").." is the MVP. He did"..max_val.." damage.")
- if player(id,"team") > 0 then
- msg2(id,"\169255220000Damange\169255220000 in this round: "..dmg[id].." damage.")
- msg2(id,"\169255220000Damage\169255220000 in total: "..total[id].." damage.")
- end
- end
- end
- addhook('minute','minute_hook')
- function minute_hook()
- msg(color[9].."")
- parse("msg Don't forget to visit us at Discord, link is on briefing, just click on it.")
- parse("msg If you got any suggestion, just let us know!")
- parse("msg Merry playtime, users!")
- msg(color[9].."")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement