Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if CLIENT then
- local function playerDisconnect( um )
- local ply = um.ReadEntity( um )
- chat.AddText(Color(188,228,240), "Welcome " .. ply:Nick() .. " to the server!")
- end
- local function playerConnect( um )
- local ply = um.ReadEntity( um )
- chat.AddText(Color(219,86,46), ply:Nick() .. "has left the server.")
- end
- usermessage.Hook ( "playerDisconnect", playerDisconnect )
- usermessage.Hook ( "playerConnect", playerConnect )
- end
- if SERVER then
- local function onPlayerDisconnect( ply )
- usmg.Start ( "playerDisconnect" )
- usmg.Entity ( ply )
- end
- local function onPlayerConnect ( ply )
- usmg.Start ( "playerConnect" )
- usmg.Entity ( ply )
- end
- hook.Add ( "PlayerDisconnected", "PlyDC", onPlayerDisconnect )
- hook.Add ( "PlayerSpawn", "PlyJoin", onPlayerConnect )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement