Ulysses
General => Developers Corner => Topic started by: Promptitude on January 04, 2016, 12:30:14 PM
-
How would I go about making certain ULX ranks apply to the IsAdmin() class?
-
If I remember right, make the group inherit from the default "admin" group.
Same goes for "superadmin" and IsSuperAdmin().
-
I found this in the Garry's Mod Github.
--[[---------------------------------------------------------
Name: IsAdmin
Desc: Returns if a player is an admin.
-----------------------------------------------------------]]
function meta:IsAdmin()
if self:IsSuperAdmin() then return true end
if self:IsUserGroup("admin") then return true end
return false
end
-
promptitude, what decicus says is correct.
ULib, and therefore ULX, allow inheritance.
If you set any group to inherit the admin group in your group setup, IsAdmin will return true.
Be warned however, Gmod's admin access allows much control over a server.