General > Developers Corner
ULX ADMIN GROUPS LUA HALP!!!
nofear1999:
I have, could you please explain the format to me?
I look @ Gmod wiki alot, i've gone through EVERY tutorial.
Please, explain it to me. :/l
jay209015:
CheckGroup("group")
nofear1999:
so
if ply:CheckGroup("respected") then
ply:Give("gmod_tool")
ply:Give("Physgun")
end
or
if CheckGroup("respected") then
ply:Give("gmod_tool")
ply:Give("Physgun")
end
JamminR:
Your first example should work.
Boolean basically means true or false.
Be careful though. CheckGroup will see inherited groups and return true.
For example, if admin inherits respected in the ULib UCL chain... admin's would get returned as true also.
If you only want the respected group to have something, then GetUserGroup is your best bet, and for that you would then use the example you showed already "if ply:GetUserGroup() == "respected" then"
nofear1999:
Thank you jamminR, i just went in like that and added or == ("admin") or ("superadmin") then
Navigation
[0] Message Index
[*] Previous page
Go to full version