Ulysses

General => Developers Corner => Topic started by: Gunz Blazzinn on December 15, 2016, 02:43:33 PM

Title: ULX Rank Checking
Post by: Gunz Blazzinn on December 15, 2016, 02:43:33 PM
I have some code written that i am working on but i need to be able to check if a rank is in the ULib. Like checking if there is a rank "owner" and if so do this if not do this. I'm learning how to code but so far its working great hopefully someone can help me with this. Thanks in Advance! :)
Title: Re: ULX Rank Checking
Post by: JamminR on December 15, 2016, 03:03:21 PM
Table ULib.ucl stores group information (and many other things)
You could test existence of ranks in it if you wanted.
As for chacking if players are in groups, group checking can be done with or without ULib. We simply enhance some of the group check functions to include inheritance and can target features.
Then we go further and add a command or two that Gmod doesn't have.
Normal Gmod;
(http://wiki.garrysmod.com/favicon.ico) Player:IsUserGroup (http://wiki.garrysmod.com/page/Player/IsUserGroup)
(http://wiki.garrysmod.com/favicon.ico) Player:IsSuperAdmin (http://wiki.garrysmod.com/page/Player/IsSuperAdmin)
(http://wiki.garrysmod.com/favicon.ico) Player:IsAdmin (http://wiki.garrysmod.com/page/Player/IsAdmin)

ULib enhanced/additional;
See the commands at http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html
Any mention of ucl is 'user control list', where we store group information and more about players on the server.