mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-16 23:27:35 +00:00
13 lines
456 B
Lua
13 lines
456 B
Lua
function gmInte.wsPlayerSay(data)
|
|
gmInte.SendNet("wsRelayDiscordChat", data, nil)
|
|
end
|
|
|
|
function gmInte.playerSay(ply, text, teamOnly)
|
|
gmInte.http.post("/servers/:serverID/players/" .. ply:SteamID64() .. "/say", {
|
|
["player"] = gmInte.getPlayerFormat(ply),
|
|
["text"] = text,
|
|
["teamOnly"] = teamOnly,
|
|
})
|
|
end
|
|
|
|
hook.Add("PlayerSay", "gmInte:SyncChat:PlayerSay", function(ply, text, team) gmInte.playerSay(ply, text, team) end) |