-
Notifications
You must be signed in to change notification settings - Fork 2
PrintGlobal
Last updated for version v0.3.1
This is a sub-addon in VExtensions, it adds several functions that allow you to print to other people's chat with different colors, etc. It behaves similarly to chat.AddText, except you can align colors and strings in any order. You are warned in your console when someone is printing to your chat, there is a limit in number of characters, number of arguments and there is a limit to how many times you can print in a second.
Here are the convars:
printglobal_charmax_sv (By default 350 characters)
printglobal_argmax_sv (By default 50 args)
printglobal_burst_sv (By default 4 per second) -- Removed since v0.3.0 temporarily.
Returns 1 or 0 for whether you can call printGlobal()
Returns 1 or 0 for whether you can printGlobal to player ply, does not keep in mind whether you can printGlobal at all, so you must use this alongside canPrintGlobal to make sure you don't go past the burst limit.
Prints to everyone's chat, similar to how chat.AddText does, using an assortment of vectors and strings.
By default prints to everyone, but the first argument may be either:
A single valid player
An array of valid players.
Costs ~100 ops by default, but as the message is longer, 3 ops are added per byte sent, and ~1000 ops per newline to avoid abuse.
Prints to everyone's chat using an array of arguments instead of ..., behaves similarly to chat.addText
Prints to a certain players chat, otherwise the same as printGlobal(...)
Prints to an array of people's chats using an array of arguments instead of ..., otherwise the same as printGlobal(...)
Sets the e2 to run on people using the printGlobal function with e2, n being 1 to run and 0 to not run
Returns 1 or 0 for whether the e2 chip was triggered by someone sending a printGlobal to you.
Returns an array of the last printGlobalClk information retrieved
Returns an array of the last printGlobalClk information retrieved that ply sent.
Returns the last player to send a printGlobal message to you.
Returns the last text to be sent with printGlobal, the text being merged from all of the strings given. For example, if someone calls printGlobal("hello",vec(255,0,0),"world"), lastGPrintText will return "helloworld".
Returns the last text to be sent by player ply with printGlobal