• ULX Tsay Edit
    1 replies, posted
------------------------------ Tsay ------------------------------ function ulx.tsay( calling_ply, message ) ULib.tsay( _, message ) if ULib.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." ) I am trying to have a way to have it say "[Brodcast]" before the message. Would this possibly work: [CODE]message = "".. (calling_ply:IsValid() and "[Brodcast]" .. ": ".. message[/CODE]
No need to check if the calling_ply is valid. Also, just add [Broadcast] to the message before it's sent into ULib.tsay
Sorry, you need to Log In to post a reply to this thread.