Ulysses

General => Developers Corner => Topic started by: talmera on January 28, 2013, 04:05:35 AM

Title: Custom permission?
Post by: talmera on January 28, 2013, 04:05:35 AM
So I know you can use the
Code: [Select]
ply:checkgroup to see if they are in a group or if they are in any higher group in the chain but this can cause problems.

I was wondering several things:

And
Code: [Select]
ULib.ucl.addUser(realsteamid, allows, denies, ULX_USERGROUP)

Sorry for the cluster of questions but I thought I would get rid of them in one big swoop :3
Title: Re: Custom permission?
Post by: Megiddo on January 28, 2013, 04:37:49 AM
Don't forget to refer to the documentation for questions like these.

Checking to see if a player is allowed something: http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html#ucl.query

Creating a custom access string: http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.registerAccess

userallow: http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.userAllow
Title: Re: Custom permission?
Post by: talmera on January 28, 2013, 05:18:04 AM
Don't forget to refer to the documentation for questions like these.

Checking to see if a player is allowed something: http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html#ucl.query

Creating a custom access string: http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.registerAccess

userallow: http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.userAllow

cool thank you, I'm still relatively new to lua but thought I would start out by doing some practical stuff :D
Title: Re: Custom permission?
Post by: talmera on January 28, 2013, 06:02:14 AM
one last thing, does xgui have any online documentation like that?
Title: Re: Custom permission?
Post by: Stickly Man! on January 28, 2013, 12:36:05 PM
I wish! No, I haven't gotten any documentation up and running for XGUI. But if you need any help on where to get started or have any specific questions, I can hopefully answer them for you!
Title: Re: Custom permission?
Post by: JamminR on January 28, 2013, 03:01:14 PM

ULib documentation is reasonably clear.
ULX, well, the code is pretty well commented, and we use a straightforward coding style, which in the end often points to standard Lua and our ULib when possible.
If you get you're own ULX commands working well, with all the hints that can be used within them, (, hint = "Number of <x>", ), and if needed, you're own category...I'm reasonably sure XGUI picks up on it.
Stickly Man has done a good job of XGUI "command-awareness".