Author Topic: Ulx command see only this steamid ?  (Read 2982 times)

0 Members and 2 Guests are viewing this topic.

Offline Gigabait

  • Newbie
  • *
  • Posts: 13
  • Karma: -2
Ulx command see only this steamid ?
« on: March 27, 2016, 12:50:49 AM »
Its possible  :-\?


Code: [Select]
CATEGORY_NAME = "OnlyWhiteSteamID"

if LocalPlayer():SteamID() == "STEAM_0:0:0" then return end
function ulx.psay( calling_ply, target_ply, message )
ulx.fancyLog( { target_ply, calling_ply }, "#P to #P: " .. message, calling_ply, target_ply )
end
local psay = ulx.command( CATEGORY_NAME, "ulx psay", ulx.psay, "!p", true )
psay:addParam{ type=ULib.cmds.PlayerArg, target="!^", ULib.cmds.ignoreCanTarget }
psay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
psay:defaultAccess( ULib.ACCESS_ALL )
psay:help( "Send a private message to target." )

error cl
Code: [Select]
[ERROR] addons/admin-ulx/lua/ulx/modules/sh/testhide.lua:3: attempt to call method 'SteamID' (a nil value)
  1. unknown - addons/admin-ulx/lua/ulx/modules/sh/testhide.lua:3
   2. include - [C]:-1
    3. unknown - addons/admin-ulx/lua/ulx/cl_init.lua:17
     4. include - [C]:-1
      5. unknown - addons/admin-ulx/lua/ulib/modules/ulx_init.lua:4
       6. include - [C]:-1
        7. unknown - addons/admin-ulib/lua/ulib/cl_init.lua:23
         8. include - [C]:-1
          9. unknown - addons/admin-ulib/lua/autorun/ulib_init.lua:5
sv
Code: [Select]
[ERROR] addons/admin-ulx/lua/ulx/modules/sh/testhide.lua:3: attempt to call glob
al 'LocalPlayer' (a nil value)
  1. unknown - addons/admin-ulx/lua/ulx/modules/sh/testhide.lua:3
« Last Edit: March 27, 2016, 05:25:09 AM by Gigabait »

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Ulx command see only this steamid ?
« Reply #1 on: March 27, 2016, 01:29:07 AM »
I don't understand what you're trying to do, make it so only players with a certain SteamID can use psay? Why not just restrict it to a super high group and put the players you want to use it in that group?
Once you get to know me, you'll find you'll have never met me at all.

Offline Gigabait

  • Newbie
  • *
  • Posts: 13
  • Karma: -2
Re: Ulx command see only this steamid ?
« Reply #2 on: March 27, 2016, 01:59:53 AM »
I don't understand what you're trying to do, make it so only players with a certain Steam ID can use psay? Why not just restrict it to a super high group and put the players you want to use it in that group?
No , i try to make so that a player with a certain Steamid could see this command.

Not necessarily psay, it could be any other command.
« Last Edit: March 27, 2016, 02:03:28 AM by Gigabait »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Ulx command see only this steamid ?
« Reply #3 on: March 27, 2016, 04:16:08 AM »
What do you mean by "see it"? Only users with access to a command have it listed in XGUI and help.
Experiencing God's grace one day at a time.

Offline Gigabait

  • Newbie
  • *
  • Posts: 13
  • Karma: -2
Re: Ulx command see only this steamid ?
« Reply #4 on: March 27, 2016, 04:30:39 AM »
What do you mean by "see it"? Only users with access to a command have it listed in XGUI and help.
This is for groups only. All players who are in the group see this command :/

I need to make only the specific SteamID could see this command.
Or make a category which can only see specific SteamID ?
« Last Edit: March 27, 2016, 04:36:12 AM by Gigabait »

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Ulx command see only this steamid ?
« Reply #5 on: March 27, 2016, 06:33:55 AM »
This is for groups only. All players who are in the group see this command :/

I need to make only the specific SteamID could see this command.
Or make a category which can only see specific SteamID ?
Code: [Select]
ulx userdeny <name> "<command>"
bw81@ulysses-forums ~ % whoami
Homepage

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Ulx command see only this steamid ?
« Reply #6 on: March 27, 2016, 01:38:44 PM »
Code: [Select]
ulx userdeny <name> "<command>"

Byte got to it first. Essentially what that command does is what you want, but backwards. It removes the access to the command from that specific player.
Once you get to know me, you'll find you'll have never met me at all.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Ulx command see only this steamid ?
« Reply #7 on: March 27, 2016, 02:07:19 PM »
Byte got to it first. Essentially what that command does is what you want, but backwards. It removes the access to the command from that specific player.
Oh, derp.

Code: [Select]
ulx userallow <name> <command>
bw81@ulysses-forums ~ % whoami
Homepage