----------------------
function Array(size,value)
local array = {}
for i = 1, size do
array[i]=value
end
return array
end
--
adminList = {37802} --ids-Usgn
--
ct_man = Array(32,false)
adminnokill = Array(32,false)
function isAdmin(id)
for _, usgn in ipairs(adminList) do
if player(id,'usgn')==usgn then
return true
end
end
return false
end
addhook([[join]],[[thejoin]])
function thejoin(id)
if isAdmin(id) then
msg("©000255255(SERVER) "..player(id,"name").." Admin Online!@C")
end
end
addhook([[team]],[[theteam]])
function theteam(id,t)
if isAdmin(id) then
if t==2 then
adminnokill[id]=true
ct_man[id]=true
elseif t==1 then
ct_man[id]=true
end
else
if t==2 then
parse("maket "..id)
return 1
end
end
end
addhook([[hit]],[[thehit]])
function thehit(id,source,weapon,hpdmg,apdmg)
if adminnokill[id]==true then
return 1
end
end
-----------------------------------------
dofile("sys/lua/samples/adminteam.lua")
-----------------------------------------
edited 3×, last 28.05.11 11:47:45 pm