Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Gigabait on March 27, 2016, 12:50:49 AM

Title: Ulx command see only this steamid ?
Post by: Gigabait 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
Title: Re: Ulx command see only this steamid ?
Post by: Caustic Soda-Senpai 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?
Title: Re: Ulx command see only this steamid ?
Post by: Gigabait 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.
Title: Re: Ulx command see only this steamid ?
Post by: Megiddo 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.
Title: Re: Ulx command see only this steamid ?
Post by: Gigabait 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 ?
Title: Re: Ulx command see only this steamid ?
Post by: Bytewave 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>"
Title: Re: Ulx command see only this steamid ?
Post by: Caustic Soda-Senpai 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.
Title: Re: Ulx command see only this steamid ?
Post by: Bytewave 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>