Messages

Handles messaging like logging, debug, etc.

Summary
MessagesHandles messaging like logging, debug, etc.
Functions
tsayPrints a message in talk say as well as in the user’s consoles.
tsayColorPrints a tsay message in color!
tsayErrorJust like tsay, but prints the string in red
csayPrints a message in center of the screen as well as in the user’s consoles.
consolePrints a message in the user’s consoles.
errorGives an error to console.
debugFunctionCallPrints a function call, very useful for debugging.

Functions

tsay

function ULib.tsay(ply,
msg,
wait,
wasValid)

Prints a message in talk say as well as in the user’s consoles.

Parameters

plyThe player to print to, set to nil to send to everyone.  (Ignores this param if called on client)
msgThe message to print.
wait(Optional, defaults to false) Wait one frame before posting.  (Useful to use from things like chat hooks)
wasValid(INTERNAL USE ONLY) This is flagged on waiting if the player was valid.

Revisions

v2.10Initial

tsayColor

function ULib.tsayColor(ply,
wait,
...)

Prints a tsay message in color!

Parameters

plyThe player to print to, set to nil to send to everyone.  (Ignores this param if called on client)
wait(Optional, defaults to false) Wait one frame before posting.  (Useful to use from things like chat hooks)
...color arg and text arg ad infinitum, color needs to come before the text it’s coloring.

Revisions

v2.40Initial.

tsayError

function ULib.tsayError(ply,
msg,
wait)

Just like tsay, but prints the string in red

Parameters

plyThe player to print to, set to nil to send to everyone.  (Ignores this param if called on client)
msgThe message to print.
wait(Optional, defaults to false) Wait one frame before posting.  (Useful to use from things like chat hooks)

Revisions

v2.40Initial.

csay

function ULib.csay(ply,
msg,
color,
duration,
fade)

Prints a message in center of the screen as well as in the user’s consoles.

Parameters

plyThe player to print to, set to nil to send to everyone.  (Ignores this param if called on client)
msgThe message to print.
color(Optional, defaults to 255, 255, 255, 255) The color of the text.
duration(Optional) The amount of time to show the text.
fade(Optional, defaults to 0.5) The length of fade time

Revisions

v2.10Added fade parameter.  Fixed it sending the message multiple times.
v2.40Changed to use clientRPC.

console

function ULib.console(ply,
msg)

Prints a message in the user’s consoles.

Parameters

plyThe player to print to, set to nil to send to everyone.  (Ignores this param if called on client)
msgThe message to print.

error

function ULib.error(s)

Gives an error to console.

Parameters

sThe string to use as the error message

debugFunctionCall

function ULib.debugFunctionCall(name,
...)

Prints a function call, very useful for debugging.

Parameters

nameThe name of the function called.
...all arguments to the function.

Revisions

v2.40Now uses print instead of Msg, since Msg seems to have a low max length.  Changed how the variable length params work so you can pass nil followed by more params
function ULib.tsay(ply,
msg,
wait,
wasValid)
Prints a message in talk say as well as in the user’s consoles.
function ULib.tsayColor(ply,
wait,
...)
Prints a tsay message in color!
function ULib.tsayError(ply,
msg,
wait)
Just like tsay, but prints the string in red
function ULib.csay(ply,
msg,
color,
duration,
fade)
Prints a message in center of the screen as well as in the user’s consoles.
function ULib.console(ply,
msg)
Prints a message in the user’s consoles.
function ULib.error(s)
Gives an error to console.
function ULib.debugFunctionCall(name,
...)
Prints a function call, very useful for debugging.
Close