Permission bug fix
If a player does not have a rank this function will crash the game.
This commit is contained in:
parent
f75a2ea008
commit
3bbf84896c
12
factions.lua
12
factions.lua
@ -409,11 +409,13 @@ function factions.Faction.has_permission(self, player, permission)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local perms = self.ranks[p]
|
local perms = self.ranks[p]
|
||||||
for i in ipairs(perms) do
|
if perms then
|
||||||
if perms[i] == permission then
|
for i in ipairs(perms) do
|
||||||
return true
|
if perms[i] == permission then
|
||||||
end
|
return true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user