• HUDShouldDraw / PlayerBindPress / Chatbox bug
    1 replies, posted
I met a problem using GM/HUDShouldDraw hook while creating custom chatbox. I believe my code will explain situation better than any words: PART 1 local blocked = { ... ["CHudChat"] = true, ... } hook.Add("HUDShouldDraw", "COMDISABLEHUD", function(name) if blocked[name] then return false end end) PART 2 hook.Add ("PlayerBindPress", "override_chat", function (ply, bind, pressed) if bind == "messagemode" and pressed == true then chat_open () else return end return true end) If I press 'y' button everything goes well, but pressing 'u' button (teamchat) somehow removes main menu - pressing ESC doesn't do anything and I'm unable to leave the server. Also kicking myself with srcds console results in black screen in the game, so I have to restart the game. It's going well though if I change code like this: hook.Add ("PlayerBindPress", "soc_override_chat", function (ply, bind, pressed) if bind == "messagemode" or bind == "messagemode2" and pressed == true then chat_open () else return end return true end) I'm not sure where should I place glua bug reports, so I'm doing it here.
use hook.Add("StartChat", "", function() end)
Sorry, you need to Log In to post a reply to this thread.