Can you tell us (maybe show us the code of) what you tried and why it didn't work? We might be able to assist you with any road blocks you encountered.
I mainly copied off the command below and got this:
function ulx.comms( calling_ply, message )
ULib.comms( _, message )
if util.tobool( GetConVarNumber( "ulx_logChat" ) ) then
ulx.logString( string.format( "(comms from %s) %s", calling_ply:IsValid() and calling_ply:Nick() or "Console", message ) )
end
end
local tsay = ulx.command( CATEGORY_NAME, "ulx comms", ulx.comms, "!comms", true, true )
tsay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
tsay:defaultAccess( ULib.ACCESS_ALL )
tsay:help( "Send a message through comms." )
and used this as reference.
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." )