Skip to content

PrintGlobal

Vurv edited this page Oct 2, 2020 · 11 revisions

PrintGlobal wiki

Main info

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)

Documentation

Number = canPrintGlobal()

Returns 1 or 0 for whether you can call printGlobal()

Number = canPrintTo(entity ply)

Returns 1 or 0 for whether you can printGlobal to player ply

printGlobal(...)

Prints to everyone's chat, similarly to how chat.addText does, with colors and text that can be organized in any way. First argument can be an array of players

printGlobal(array args)

Prints to everyone's chat using an array of arguments instead of ..., behaves similarly to chat.addText

printGlobal(array playersToPrintTo, array args)

Prints to an array of people's chats using an array of arguments instead of ..., behaves similarly to chat.addText

runOnPrintGlobal(number doRunOn)

Sets the e2 to run on people using the printGlobal function with e2, n being 1 to run and 0 to not run

Number = printGlobalClk()

Returns 1 or 0 for whether the e2 chip was triggered by someone using printGlobal on e2

Array = lastGPrintRaw()

Returns an array of the last printGlobalClk information retrieved

Array = lastGPrintRaw(entity ply)

Returns an array of the last printGlobalClk information retrieved on player ply

Entity = lastGPrintSender()

Returns the last player to use printGlobal

String = lastGPrintText()

Returns the last text to be sent with printGlobal, the text being merged from all of the strings given.

String = lastGPrintText(entity ply)

Returns the last text to be sent by player ply with printGlobal

Clone this wiki locally