Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. function PermaProps.HasPermission( ply, name )
  2.     if ply:IsSuperAdmin() then return true end
  3.     if !PermaProps or !PermaProps.Permissions or !PermaProps.Permissions[ply:GetUserGroup()] then return false end
  4.  
  5.     if PermaProps.Permissions[ply:GetUserGroup()].Custom == false and PermaProps.Permissions[ply:GetUserGroup()].Inherits and PermaProps.Permissions[PermaProps.Permissions[ply:GetUserGroup()].Inherits] then
  6.         return PermaProps.Permissions[PermaProps.Permissions[ply:GetUserGroup()].Inherits][name]
  7.     end
  8.  
  9.     return PermaProps.Permissions[ply:GetUserGroup()][name]
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement