• check if chat is open
    5 replies, posted
Hi Guys :) is there a function or hook that can check if the chat is open? i binded KEY_M to my map and when i type in chat something with "m" the map opens, so i need a check if the chat is opened sry for bad english :D
Not sure if there is, but you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/StartChat]GM:StartChat[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/FinishChat]GM:FinishChat[/url] to set your own variable for it
thanks a lot that is working :)
[QUOTE=Moat;52177539][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/IsTyping]Player:IsTyping[/url] returns whether or not the chat is open.[/QUOTE] IIRC it only works with the default chat box and basic chat boxes
[QUOTE=JasonMan34;52177932]IIRC it only works with the default chat box and basic chat boxes[/QUOTE] Any decent custom chat box would overwrite the function. Likewise using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/StartChat]GM:StartChat[/url] probably isn't reliable considering the custom chat box would have to return inside that hook, possibly stopping the hook you added. Unless custom chat boxes use a different method to stop the default one from coming up of course.
Sorry, you need to Log In to post a reply to this thread.