General > Developers Corner
ply:IsDonator?
(1/1)
eric1555:
When I have custom groups like "donator" how would I define them, like ply:IsSuperAdmin()?
Would it be "ply:Isdonator()" or ply:IsUserGroupdonator()
Stickly Man!:
If my memory isn't failing me, you should be doing this:
if ( ply:GetUserGroup() == "donator" ) then
Megiddo:
Stickly Man is correct, the Is*Admin() functions are provided for convenience, ply:GetUserGroup() == "*admin" is the same thing.
MrPresident:
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..
JamminR:
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
Navigation
[0] Message Index
Go to full version