Refactor server-side Lua code

This commit is contained in:
Linventif 2024-01-17 03:48:38 +01:00
parent b2962a06a5
commit ac216b558f

View File

@ -80,7 +80,6 @@ function gmInte.playerSay(ply, text, team)
end end
function gmInte.wsPlayerSay(data) function gmInte.wsPlayerSay(data)
if !gmInte.config.syncChat then return end
gmInte.SendNet(1, data, nil) gmInte.SendNet(1, data, nil)
end end
@ -95,6 +94,14 @@ function gmInte.takeScreenshot(ply)
}, ply) }, ply)
end end
function gmInte.wsPlayerScreen(data)
for _, ply in pairs(player.GetAll()) do
if (ply:SteamID64() == data.steamID64) then
gmInte.takeScreenshot(ply)
end
end
end
function gmInte.wsRcon(data) function gmInte.wsRcon(data)
gmInte.log("Rcon Command from Discord '" .. data.command .. "' by " .. data.steamID) gmInte.log("Rcon Command from Discord '" .. data.command .. "' by " .. data.steamID)
game.ConsoleCommand(data.command .. "\n") game.ConsoleCommand(data.command .. "\n")