dobrograd-13-06-2022/garrysmod/addons/admin-sg/lua/plugins/sandbox/init.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

23 lines
No EOL
595 B
Lua

--[[
© 2017 Thriving Ventures Limited do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
]]
local plugin = plugin;
plugin:IncludeFile("shared.lua", SERVERGUARD.STATE.SHARED)
plugin:IncludeFile("cl_panel.lua", SERVERGUARD.STATE.CLIENT)
serverguard.netstream.Hook("sgSandboxChangeSetting", function(player, data)
if (player:IsAdmin()) then
local conVar = plugin.convars[data[1]];
if (conVar) then
local newValue = math.Round(tonumber(data[2]));
game.ConsoleCommand(conVar.." "..tostring(newValue).."\n");
end;
end;
end);