Ulysses

General => Developers Corner => Topic started by: PureGamingHD on November 07, 2017, 09:13:10 AM

Title: ULX Command Restriction
Post by: PureGamingHD on November 07, 2017, 09:13:10 AM
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?
Title: Re: ULX Command Restriction
Post by: iViscosity on November 07, 2017, 09:17:46 AM
Create a check in the command that returns if the ID doesn't match

Sent using Tapatalk. Owner of iViscosity Gaming.

Title: Re: ULX Command Restriction
Post by: MrPresident on November 07, 2017, 12:36:10 PM
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.