Is it possible to override a gamemode function in a addon? Say I wanted to high the chat box for example, COuld I do this with an addon? Thanks
To hide the chatbox you can just use
GM/HUDShouldDraw and return false to CHudChat HUD element.
Yeh but the think is with this, Is that I wanna do it in a addon, So I cannot override a gamemode function with an addon can I?
Override, Not hook onto
Hooks are ran before gamemode functions. Return something in a hook to stop all further hooks and functions from being ran.
Ah thanks, I did not realise I could return with hooks,
[editline]18th February 2015[/editline]
Oh one more thing, How would I hide the chat without the players view snapping to weird positions
Quote from wiki
“CHudChat The default chat box. Hiding this element will cause players view angles to snap to a random angle when they try to open the chat.”
Stop the chatbox from opening with StartChat.
But they I return false on that, The chatbox would not open, But would FinishChat or CloseChat still be called if I were to press escape(Im trying to make a custom chatbox ) Thanks
I havn’t tried it yet … but I think you have to override the command with GM:PlayerBindPress and the bind should be “messagemode” and “messagemode2”
From the base game-mode: https://dl.dropboxusercontent.com/u/26074909/tutoring/chat_box/creating_custom_chatbox.lua.html