add chat sync to discord

This commit is contained in:
Linventif 2023-09-20 17:23:20 +02:00
parent c290e31465
commit a06ece834e

View File

@ -1,26 +1,36 @@
// //
// Hooks // Server
// //
// Server
hook.Add("ShutDown", "gmInte:Server:ShutDown", function() hook.Add("ShutDown", "gmInte:Server:ShutDown", function()
gmInte.serverShutDown(ply) gmInte.serverShutDown()
end) end)
// set convar sv_hibernate_think to 1
hook.Add("Initialize", "gmInte.sendStatus", function() hook.Add("Initialize", "gmInte.sendStatus", function()
timer.Simple(1, function() timer.Simple(1, function()
gmInte.serverStart()
gmInte.sendStatus() gmInte.sendStatus()
end) end)
end) end)
//
// Player // Player
//
gameevent.Listen("player_connect") gameevent.Listen("player_connect")
hook.Add("player_connect", "gmInte:Player:Connect", function(data) hook.Add("player_connect", "gmInte:Player:Connect", function(data)
gmInte.playerConnect(data) gmInte.playerConnect(data)
end) end)
hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply) hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply)
gmInte.playerDisconnected(ply) gmInte.playerDisconnected(ply)
end) end)
hook.Add("onPlayerChangedName", "gmInte:PlayerChangeName", function(ply, old, new) hook.Add("onPlayerChangedName", "gmInte:PlayerChangeName", function(ply, old, new)
gmInte.playerChangeName(ply, old, new) gmInte.playerChangeName(ply, old, new)
end) end)
hook.Add("PlayerSay", "gmInte:PlayerSay", function(ply, text, team)
gmInte.playerSay(ply, text, team)
end)