diff --git a/lua/gmod_integration/server/sv_hook.lua b/lua/gmod_integration/server/sv_hook.lua index d5cb9cd..e6db344 100644 --- a/lua/gmod_integration/server/sv_hook.lua +++ b/lua/gmod_integration/server/sv_hook.lua @@ -1,26 +1,36 @@ // -// Hooks +// Server // -// Server hook.Add("ShutDown", "gmInte:Server:ShutDown", function() - gmInte.serverShutDown(ply) + gmInte.serverShutDown() end) -// set convar sv_hibernate_think to 1 + hook.Add("Initialize", "gmInte.sendStatus", function() timer.Simple(1, function() + gmInte.serverStart() gmInte.sendStatus() end) end) +// // Player +// + gameevent.Listen("player_connect") + hook.Add("player_connect", "gmInte:Player:Connect", function(data) gmInte.playerConnect(data) end) + hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply) gmInte.playerDisconnected(ply) end) + hook.Add("onPlayerChangedName", "gmInte:PlayerChangeName", function(ply, old, new) gmInte.playerChangeName(ply, old, new) +end) + +hook.Add("PlayerSay", "gmInte:PlayerSay", function(ply, text, team) + gmInte.playerSay(ply, text, team) end) \ No newline at end of file