Garry's Mod commands hooking.
require("asc")
hook.Add("AllowStringCommand", "deny_connect_cmd", function(cmd_str, is_unrestricted)
if cmd_str:match("^connect ") then
print("refusing to connect to server")
return false
end
end)
- Get premake add it to your
PATH
- Get garrysmod_common (with
git clone https://github.com/danielga/garrysmod_common --recursive --branch=x86-64-support-sourcesdk
) and set an env var calledGARRYSMOD_COMMON
to the path of the local repo - Run
premake5 gmake --gmcommon=$GARRYSMOD_COMMON
in your local copy of this repo - Navigate to the makefile directory (
cd /projects/linux/gmake
orcd /projects/macosx/gmake
) - Run
make config=releasewithsymbols_x86_64
- Get premake add it to your
PATH
- Get garrysmod_common (with
git clone https://github.com/danielga/garrysmod_common --recursive --branch=x86-64-support-sourcesdk
) and set an env var calledGARRYSMOD_COMMON
to the path of the local repo - Run
premake5 vs2019
in your local copy of this repo - Navigate to the project directory
cd /projects/windows/vs2019
- Open the .sln in Visual Studio 2019+
- Select Release, and either x64 or x86
- Build