Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cl_shownewhud = CreateClientConVar("cl_shownewhud", "1", true, false)
- local function add_text(...)
- if cl_shownewhud:GetBool() then
- local data = parse_addtext({...})
- show_text(data)
- return true
- else
- hook.Remove("HUDPaint", "chathud")
- end
- end
- hook.Add("ChatText", "chathud", function( _, _, msg, msg_type )
- add_text({chatprint_font},chatprint_color,tostring(msg))
- end)
- hook.Add("HUDShouldDraw", "chathud", function(name)
- if cl_shownewhud:GetBool() and name == "CHudChat" then
- return false
- end
- end)
- -- NEED: lua/includes/extensions/chat_addtext_hack.lua
- _G.PrimaryChatAddText = add_text
- chat.AddTextX = add_text
Advertisement
Add Comment
Please, Sign In to add comment