Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: JackYack13 on December 07, 2011, 12:23:16 PM
-
Hello. I already know how to make custom ulx commands, and now I'd like to find out how to make custom permissions. By that I mean stuff like "ulx physgunplayer", "ulx spawnecho", etc.
For example, I'd like to do something like:
if ply has permission "ulx blabla" then
do stuff
end
But also make it possible to edit the permission for each group with xgui just like the regular ones.
Is it possible? If yes, then could I see an example of how it could be done? Thanks.
-
Is this a permission for a command or are you only using it as a flag? EG, "has permission to use reserved slots" would be a flagged permission.
-
Physgunning would be pretty hard to restrict to any kind of "admin"
Doesn't gmod by default just allow that to 'IsAdmin' and up
-
Is this a permission for a command or are you only using it as a flag? EG, "has permission to use reserved slots" would be a flagged permission.
I already know how to make commands. I'd like to find out how to make those "flags".
-
Never mind. I've figured it out myself after looking at some default ULX lua files. For those of you who are having the same problem:
To create a custom permission: ULib.ucl.registerAccess("name", ULib.ACCESS_ALL, "help string", "category")
To check if a player has the permission: ULib.ucl.query(ply,"name") - this return true or false.