Hi guys,
Well, I recently made a custom chatbox with custom gui tags and everything and I need to know one simple thing to complete it:
How do I get PrintMessage functions to show up in my chatbox?
I have everyone's chat working, along with *DEAD* and (TEAM) and the console shows up too if I rcon speak, but I just can't figure out how to display PrintMessages
Please reply with an example script, thanks.
Replace every time you use PrintMessage with ChatPrint, then override chat print with:
[lua]
local meta = FindMetaTable("Player")
function meta:ChatPrint(str)
-- Do custom stuff here
end
[/lua]
Well, is there a hook or something I can use to replace it? Because I am using this chatbox on a fretta server and some of the gamemodes use PrintMessage (e.g. Garryware)
Nevermind, I found that I could use the ChatText gamemode hook to call "other than player" messages. Plugged it in and everything works fine, thanks for your help though.
Sorry, you need to Log In to post a reply to this thread.