mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
40 lines
1007 B
Lua
40 lines
1007 B
Lua
--[[
|
|
| This file was obtained through the combined efforts
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
|
|
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
|
|
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
|
--]]
|
|
|
|
if CLIENT then return end
|
|
|
|
net.Receive("arccw_sendconvar", function(len, ply)
|
|
local command = net.ReadString()
|
|
|
|
if !ply:IsAdmin() then return end
|
|
if game.SinglePlayer() then return end
|
|
if string.sub(command, 1, 5) != "arccw" then return end
|
|
|
|
local cmds = string.Split(command, " ")
|
|
|
|
local timername = "change" .. cmds[1]
|
|
|
|
if timer.Exists(timername) then
|
|
timer.Remove(timername)
|
|
end
|
|
|
|
local args = {}
|
|
for i, k in pairs(cmds) do
|
|
if k == " " then continue end
|
|
k = string.Trim(k, " ")
|
|
|
|
table.insert(args, k)
|
|
end
|
|
|
|
timer.Create(timername, 0.25, 1, function()
|
|
RunConsoleCommand(args[1], args[2])
|
|
print("Changed " .. args[1] .. " to " .. args[2] .. ".")
|
|
end)
|
|
end) |