Can somebody tell my why the person using this steam id is still restricted from using the team (whats wront with the script)
[lua]local TablePermission = {
TEAM_SWAT = {“STEAM_0:0:16596001”},
TEAM_SWATSQL = {}
}
local function APermission(ply, t)
for k,v in pairs(TablePermission) do
if t == v then
for _,vTeam in pairs(v) do
if ply.SteamID() == vTeam then
return true
end
end
else
return false
end
end
end
/---------------------------------------------------------
Teams/jobs
---------------------------------------------------------/
function meta:ChangeTeam(t, force)
if RPArrestedPlayers[self:SteamID()] then
if not self:Alive() then
Notify(self, 1, 4, “You can not change your job whilst being dead in jail.”)
return
else
Notify(self, 1, 4, “You are in Jail. Get a new job when you have been released.”)
return
end
end
self:SetNWBool("helpBoss",false)
self:SetNWBool("helpCop",false)
self:SetNWBool("helpMayor",false)
if t == TEAM_SWAT and not APermission(self, t) then
Notify(self, 1, 4, “Access to this team is restricted”)
return
end
[/lua]