General > Developers Corner

ULX Command Restriction

(1/1)

PureGamingHD:
Hello, I've been trying to figure out a way to restrict a ULX command to only be used by a certain player, instead of a certain group.

command:defaultAccess( ULib.ACCESS_SUPERADMIN ) is used for the group but I only want (SteamID) instead of a group. Is this possible?

iViscosity:
Create a check in the command that returns if the ID doesn't match

Sent using Tapatalk. Owner of iViscosity Gaming.

MrPresident:
Try using

ULib.ACCESS_NONE

Then assigning access to the user specifically through your console

ulx userallow <player> "ulx command"

That would give default access to nobody and then you could hand out the access to single users using the built in access. No need to add a check to the code.

Navigation

[0] Message Index

Go to full version