• Print

Author Topic: Ulx for a SteamID  (Read 4299 times)

0 Members and 1 Guest are viewing this topic.

Offline Reese

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Ulx for a SteamID
« on: April 14, 2016, 09:18:20 am »
Hey i'm using a custom Ulx command and I would like to put the defaultAccess(ULib.ACCESS_SUPERADMIN) to only a steamId (mine). Is it possible ?
Thank you,
Reese

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Ulx for a SteamID
« Reply #1 on: April 14, 2016, 09:42:56 am »
defaultaccess is who it shows for in the command menu. If you want it to only RUN for you, then simply add an if statement at the start of the code to check your steamid

Code: Lua
  1. if calling_ply:SteamID() == "STEAM_0:0:XXXXXXX" then
  2.  
« Last Edit: April 14, 2016, 09:44:40 am by Caustic Soda-Senpai »
Once you get to know me, you'll find you'll have never met me at all.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Ulx for a SteamID
« Reply #2 on: April 14, 2016, 09:59:51 am »
Instead of modifying commands, why don't you do it the proper way. :)

Go into your XGUI and remove access to that command from all the groups and then add it to just yourself.

Make sure you don't deny access as deny supersedes allow.



Example: ( you want to make slay for you only )

in XGUI, uncheck slay as a command that admin/superadmin can perform.
in your server console type : ulx userallow reese "ulx slay"

If you're creating your own commands, you can just leave out the line that sets the default access and it'll default to none. (meaning noone can run it until you give permissions manually)
« Last Edit: April 14, 2016, 10:03:49 am by MrPresident »

Offline Reese

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Ulx for a SteamID
« Reply #3 on: April 14, 2016, 03:04:42 pm »
Thank you, you two. I haven't tought about the two solutions ! Than you again ! Have a nice day !

  • Print