ULX
Ulysses
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Ulysses
»
General
»
Developers Corner
»
ply:IsDonator?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: ply:IsDonator? (Read 3182 times)
0 Members and 3 Guests are viewing this topic.
eric1555
Newbie
Posts: 3
Karma: 0
ply:IsDonator?
«
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()
Logged
Stickly Man!
Ulysses Team Member
Hero Member
Posts: 1270
Karma: 164
What even IS software anymore?
Re: ply:IsDonator?
«
Reply #1 on:
February 21, 2011, 09:36:41 AM »
If my memory isn't failing me, you should be doing this:
if ( ply:GetUserGroup() == "donator" ) then
Logged
Join our Team Ulysses community discord!
https://discord.gg/gR4Uye6
Megiddo
Ulysses Team Member
Hero Member
Posts: 6214
Karma: 394
Project Lead
Re: ply:IsDonator?
«
Reply #2 on:
February 21, 2011, 10:37:37 AM »
Stickly Man is correct, the Is*Admin() functions are provided for convenience, ply:GetUserGroup() == "*admin" is the same thing.
Logged
Experiencing God's grace one day at a time.
MrPresident
Ulysses Team Member
Hero Member
Posts: 2728
Karma: 430
Re: ply:IsDonator?
«
Reply #3 on:
February 21, 2011, 03:55:33 PM »
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..
«
Last Edit: February 21, 2011, 03:57:09 PM by MrPresident
»
Logged
JamminR
Ulysses Team Member
Hero Member
Posts: 8096
Karma: 390
Sertafide Ulysses Jenius
Re: ply:IsDonator?
«
Reply #4 on:
February 21, 2011, 05:23:16 PM »
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
Logged
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming
Print
Pages: [
1
]
Go Up
« previous
next »
Ulysses
»
General
»
Developers Corner
»
ply:IsDonator?