Author Topic: ULX Command Restriction  (Read 95 times)

0 Members and 1 Guest are viewing this topic.

Offline PureGamingHD

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
ULX Command Restriction
« 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?

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 698
  • Karma: 39
    • View Profile
    • iViscosity Gaming
Re: ULX Command Restriction
« Reply #1 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.

I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2568
  • Karma: 395
    • View Profile
    • |G4P| Gman4President
Re: ULX Command Restriction
« Reply #2 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.