From 0be3a8bd55d70425c7f361aca585913f589bc3bd Mon Sep 17 00:00:00 2001 From: Linventif Date: Wed, 17 Jan 2024 03:42:22 +0100 Subject: [PATCH] add chat cmd to screenshot --- lua/gmod_integration/client/cl_main.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/gmod_integration/client/cl_main.lua b/lua/gmod_integration/client/cl_main.lua index 57bfbdc..429d0a6 100644 --- a/lua/gmod_integration/client/cl_main.lua +++ b/lua/gmod_integration/client/cl_main.lua @@ -64,7 +64,24 @@ function gmInte.takeScreenShot(serverID, authToken) ) end +// +// Concommands +// + concommand.Add("gmod_integration_admin", gmInte.openAdminConfig) concommand.Add("gmod_integration_screenshot", function() gmInte.SendNet(4) +end) + +// +// Chat Commands +// + +hook.Add("OnPlayerChat", "gmInteChatCommands", function(ply, text, teamChat, isDead) + if (ply != LocalPlayer()) then return end + text = string.lower(text) + text = string.sub(text, 2) + if (text == "screen") then + gmInte.SendNet(4) + end end) \ No newline at end of file