mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:07:34 +00:00
Refactor server-side Lua code
This commit is contained in:
parent
b2962a06a5
commit
ac216b558f
|
@ -80,7 +80,6 @@ function gmInte.playerSay(ply, text, team)
|
|||
end
|
||||
|
||||
function gmInte.wsPlayerSay(data)
|
||||
if !gmInte.config.syncChat then return end
|
||||
gmInte.SendNet(1, data, nil)
|
||||
end
|
||||
|
||||
|
@ -95,6 +94,14 @@ function gmInte.takeScreenshot(ply)
|
|||
}, ply)
|
||||
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)
|
||||
gmInte.log("Rcon Command from Discord '" .. data.command .. "' by " .. data.steamID)
|
||||
game.ConsoleCommand(data.command .. "\n")
|
||||
|
|
Loading…
Reference in New Issue
Block a user