0 Members and 1 Guest are viewing this topic.
CATEGORY_NAME = "OnlyWhiteSteamID"if LocalPlayer():SteamID() == "STEAM_0:0:0" then return endfunction ulx.psay( calling_ply, target_ply, message ) ulx.fancyLog( { target_ply, calling_ply }, "#P to #P: " .. message, calling_ply, target_ply )endlocal 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] 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
[ERROR] addons/admin-ulx/lua/ulx/modules/sh/testhide.lua:3: attempt to call global 'LocalPlayer' (a nil value) 1. unknown - addons/admin-ulx/lua/ulx/modules/sh/testhide.lua:3
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?
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 ?
ulx userdeny <name> "<command>"
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.
ulx userallow <name> <command>