Ulysses
General => Developers Corner => Topic started by: eric1555 on February 21, 2011, 07:53:53 AM
-
When I have custom groups like "donator" how would I define them, like ply:IsSuperAdmin()?
Would it be "ply:Isdonator()" or ply:IsUserGroupdonator()
-
If my memory isn't failing me, you should be doing this:
if ( ply:GetUserGroup() == "donator" ) then
-
Stickly Man is correct, the Is*Admin() functions are provided for convenience, ply:GetUserGroup() == "*admin" is the same thing.
-
ply:IsUserGroup("donator")
^works too.. and is cleaner than ply:GetUserGroup() == "donator" IMO.
edit... but I think that requres ULib be installed... hmm.. <3 ULib..
-
GetUserGroup is actually a 'ULib only' function, so, yeah, IsUserGroup is your standard "no ULib needed but just isn't as cool as hanging out with cool kids" code.
http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html#Player:GetUserGroup