I was wondering about the possibility of making ULX command silent the way RCON commands are.
For example: !ulx jail LiveTrash
Users would see that, and admins would see the confirmation.
For Example: !rcon sbox_maxprops 100
No one would see that. They would only see the confirmation.
And that, ladies and gentlemen, is what I want to know, can you make ULX commands run silent like RCON. Thanks, hope it is possible.
You could simply go into the ULX LUA's and take out the string... Ive been in there befire so i know thats how to do it... Just search the document for ADMIN and match the case and you should find all of them fairly easily
Lolwut? I am not the greatest with LUA. Can you explain with slightly more detailz?
You're Dumb, He Said You Go Into Ulx Luas And Take Out The String Just Search For The Admin And Match The Case And You Should Find All Of Them Fairly Easy!
You can go into the ulx config and make it so it says
LiveTrash jailed minge
or
(ADMIN) jailed minge
or
nothing
[QUOTE=Pureluck;14560998]You're Dumb, He Said You Go Into Ulx Luas And Take Out The String Just Search For The Admin And Match The Case And You Should Find All Of Them Fairly Easy![/QUOTE]
Why Are You Talking Like This?
Anyway, ulx/lua/ulx/log.lua:
[lua]
// Code above
// line 88
function ulx.logServAct( ply, action, hide_echo )
local nick
if ply:IsValid() then
if not ply:IsConnected() then return end
nick = ply:Nick()
else
nick = "(Console)"
end
local level = GetConVarNumber( "ulx_logEcho" )
if not hide_echo and level > 0 then
local echo
if level == 1 then
echo = action:gsub( "#A", "(ADMIN)", 1 )
elseif level == 2 then
echo = action:gsub( "#A", "(ADMIN) " .. nick, 1 )
end
ULib.tsay( _, echo, true )
elseif level > 0 then
local echo = action:gsub( "#A", "(SILENT)(ADMIN) " .. nick, 1 )
ULib.tsay( ply, echo, true ) -- Whether or not the originating player has access, they're getting the echo.
local players = player.GetAll()
for _, player in ipairs( players ) do
if ULib.ucl.query( player, hiddenechoAccess ) and player ~= ply then
ULib.tsay( player, echo, true )
end
end
end
if isDedicatedServer() then
Msg( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) .. "\n" )
end
if util.tobool( GetConVarNumber( "ulx_logFile" ) ) then
ulx.logString( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) )
end
end
// line 128
// Code below
[/lua]
If you replace that chunk with this one then only admins [i]should[/i] be able to see the text or maybe I'm just retarded and you can use that ulx_logEcho cvar.
[lua]
function ulx.logServAct( ply, action, hide_echo )
local nick
if ply:IsValid() then
if not ply:IsConnected() then return end
nick = ply:Nick()
else
nick = "(Console)"
end
local level = GetConVarNumber( "ulx_logEcho" )
if level > 0 then
local echo = action:gsub( "#A", "(SILENT)(ADMIN) " .. nick, 1 )
ULib.tsay( ply, echo, true ) -- Whether or not the originating player has access, they're getting the echo.
local players = player.GetAll()
for _, player in ipairs( players ) do
if ULib.ucl.query( player, hiddenechoAccess ) and player ~= ply then
ULib.tsay( player, echo, true )
end
end
end
if isDedicatedServer() then
Msg( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) .. "\n" )
end
if util.tobool( GetConVarNumber( "ulx_logFile" ) ) then
ulx.logString( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) )
end
end
[/lua]
[QUOTE=DiscoBiscut;14563025]You can go into the ulx config and make it so it says
LiveTrash jailed minge
or
(ADMIN) jailed minge
or
nothing[/QUOTE]
Sorry to bump an old thread, but for future reference, you can do what DiscoBiscut said from the ULX config.
This IS old, but just to add, why not just use the console command?
i am new:)
ulx server.ini + ulx logEcho 0
How do you hide certain commands like !traitor and let other commands show up like !slap
[QUOTE=Salads;14563073]Why Are You Talking Like This?
Anyway, ulx/lua/ulx/log.lua:
[lua]
// Code above
// line 88
function ulx.logServAct( ply, action, hide_echo )
local nick
if ply:IsValid() then
if not ply:IsConnected() then return end
nick = ply:Nick()
else
nick = "(Console)"
end
local level = GetConVarNumber( "ulx_logEcho" )
if not hide_echo and level > 0 then
local echo
if level == 1 then
echo = action:gsub( "#A", "(ADMIN)", 1 )
elseif level == 2 then
echo = action:gsub( "#A", "(ADMIN) " .. nick, 1 )
end
ULib.tsay( _, echo, true )
elseif level > 0 then
local echo = action:gsub( "#A", "(SILENT)(ADMIN) " .. nick, 1 )
ULib.tsay( ply, echo, true ) -- Whether or not the originating player has access, they're getting the echo.
local players = player.GetAll()
for _, player in ipairs( players ) do
if ULib.ucl.query( player, hiddenechoAccess ) and player ~= ply then
ULib.tsay( player, echo, true )
end
end
end
if isDedicatedServer() then
Msg( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) .. "\n" )
end
if util.tobool( GetConVarNumber( "ulx_logFile" ) ) then
ulx.logString( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) )
end
end
// line 128
// Code below
[/lua]
If you replace that chunk with this one then only admins [i]should[/i] be able to see the text or maybe I'm just retarded and you can use that ulx_logEcho cvar.
[lua]
function ulx.logServAct( ply, action, hide_echo )
local nick
if ply:IsValid() then
if not ply:IsConnected() then return end
nick = ply:Nick()
else
nick = "(Console)"
end
local level = GetConVarNumber( "ulx_logEcho" )
if level > 0 then
local echo = action:gsub( "#A", "(SILENT)(ADMIN) " .. nick, 1 )
ULib.tsay( ply, echo, true ) -- Whether or not the originating player has access, they're getting the echo.
local players = player.GetAll()
for _, player in ipairs( players ) do
if ULib.ucl.query( player, hiddenechoAccess ) and player ~= ply then
ULib.tsay( player, echo, true )
end
end
end
if isDedicatedServer() then
Msg( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) .. "\n" )
end
if util.tobool( GetConVarNumber( "ulx_logFile" ) ) then
ulx.logString( action:gsub( "#A", "(ADMIN) " .. nick, 1 ) )
end
end
[/lua][/QUOTE]
Ok,did it works fine.But I want it to echo again.How?(Sorry to bump an old thread)
[highlight](User was banned for this post ("dumb bump" - postal))[/highlight]
"Sorry to bump an old thread" Thread is 5 years old.
Sorry, you need to Log In to post a reply to this thread.