TTT Ulx tsay echo to admins?

I was wondering how you could make the ulx tsay echo to admins so you could see who wrote it.

bump~

ULX has their own forums: http://forums.ulyssesmod.net/index.php#c4

No one there is responding.

Try this.

Change
[lua]
function ulx.tsay( calling_ply, message )
ULib.tsay( _, message )

if util.tobool( GetConVarNumber( "ulx_logChat" ) ) then
	ulx.logString( string.format( "(tsay from %s) %s", calling_ply:IsValid() and calling_ply:Nick() or "Console", message ) )
end

end
local tsay = ulx.command( CATEGORY_NAME, “ulx tsay”, ulx.tsay, “@@”, true, true )
tsay:addParam{ type=ULib.cmds.StringArg, hint=“message”, ULib.cmds.takeRestOfLine }
tsay:defaultAccess( ULib.ACCESS_ADMIN )
tsay:help( “Send a message to everyone in the chat box.” )
[/lua]

to

[lua]
function ulx.tsay( calling_ply, message, should_silent )
ULib.tsay( _, message )

if util.tobool( GetConVarNumber( "ulx_logChat" ) ) then
	ulx.logString( string.format( "(tsay from %s) %s", calling_ply:IsValid() and calling_ply:Nick() or "Console", message ) )
end
    ulx.fancyLogAdmin( calling_ply, should_silent ,"#A ran a tsay!(or whatever here) " )

end
local tsay = ulx.command( CATEGORY_NAME, “ulx tsay”, ulx.tsay, “@@”, true, true )
tsay:addParam{ type=ULib.cmds.StringArg, hint=“message”, ULib.cmds.takeRestOfLine }
tsay:defaultAccess( ULib.ACCESS_ADMIN )
tsay:help( “Send a message to everyone in the chat box.” )
[/lua]

I don’t usually mess with silent commands, base commands etc, but if you ever want to get into making silent commands for commands that already have a log, just look here http://forums.ulyssesmod.net/index.php?topic=6753.0

Oh and the above should only send the message to people who have the ability to see hidden echoes

Doesn’t work .-. (I updated it correctly)


addons/ulx/lua/ulx/log.lua:452: attempt to index local 'format' (a nil value)

Try [lua]ulx.fancyLogAdmin( nil, true, calling_ply, “#A whatever” )[/lua]
instead of [lua]ulx.fancyLogAdmin( calling_ply, should_silent ,"#A ran a tsay!(or whatever here) " )[/lua]

Sorry! I was on vacation. It still doesn’t work :c I appreciate all the help though!