ULX

Author Topic: ULX Command Restriction  (Read 1618 times)

0 Members and 1 Guest are viewing this topic.

Offline PureGamingHD

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
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

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
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 PM.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |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.