init_mod("lock")
lock.var("lockedteam", {})
lock.var("team", {[0] = "spec", [1] =
"t", [2] = "ct"}) lock.var("teams",
initArray(32))
function admcwsetadmin(p, x, cmd)
cmd = toTable(cmd) local id =
tonumber(cmd[1]) local team =
tonumber(cmd [2]) if not team then
return invalid(p, x) end if not
lock.team[team] then return invalid(p,
x, "Incorrect Team") end if not
player(id, "exists") then return
invalid(p, x, "No Player") end
lock.teams[id] = team if player(id,
"team") ~= team then
parse("make"..lock.team[team].."
"..id) end
end
function admlockteamadmin(p,_,cmd)
cmd = toTable(cmd) local team =
tonumber(cmd [1]) local locked =
tonumber(cmd [2]) if not team then
return invalid(p, x) end if not
lock.team[team] then return invalid(p,
x, "Incorrect Team") end
lock.team[team] = locked end
function hookteamlock_2(p,t) if
lock.team[t] then if lock.teams[p]
~= t then return 1 end end end
function hookleavelock(p)
lock.teams[p] = nil end
return lock.nam