General > Developers Corner
Commands without category?
Stickly Man!:
Again, like others have said, I don't think that changing or hiding the category will do what you want it to. The command will still show up in ULX Menu regardless- there's no way to "hide" it from people who have access to it.
--- Quote from: TheNoobKid on March 09, 2016, 09:43:22 AM ---The problem is that I have a undercover script, but everyone can use it and that is after I restrict it to superadmins only.
--- Code: ---undercover:defaultAccess( ULib.ACCESS_SUPERADMIN )
--- End code ---
When I remove admins access to it via ULX groups etc, then no one can use it..
--- End quote ---
So, "defaultAccess" will set up the INITIAL permissions the FIRST time the command has been run. It sounds like this was set to Admins when you first ran your code, so ULX gave your admins group access to "ulx undercover". Then, you changed it to Superadmin, which has no effect for you now because the permissions have already been set up. (Superadmins have access to the command through inheritance, which means removing it from admins causes superadmins not to be able to use it.)
In order to reset this, you should open your data/ulib/groups.txt file, and remove any lines that that give access to "ulx undercover". Then, find the misc_registered.txt file in the same group, and also remove the line that says "ulx undercover". Once you've done this, restart your server, and the command should be given access to Superadmins by default.
TheNoobKid:
Yes okay.
I have dropped the idea to remove this from the category.
But does any of you know why the script gonna be removed if I remove admins access to use this?
If 'admin' rank have access to this script. Then all ranks except user and donators can see it in ULX menu.
But if I remove 'admin' ranks access to use this script, then no one can see it in ULX. ?
Megiddo:
Your other groups are inheriting from 'admin' and getting access to the command. What groups do you want to have access?
TheNoobKid:
I only want rank 'owner' to have access to this.
Megiddo:
Give the owner group access and no other group.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version