Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("Think", "PlayerSpawn", function()
- for k,v in pairs(player.GetAll()) do
- if !v.IsAlive then
- hook.Call("ClientPlayerInitialSpawn", GAMEMODE,v)
- v.IsAlive = v:Alive()
- return
- end
- if v.IsAlive ~= v:Alive() then
- if v:Alive() == true then
- hook.Call("ClientPlayerSpawn", GAMEMODE, v)
- else
- hook.Call("ClientPlayerDeath", GAMEMODE,v)
- end
- end
- v.IsAlive = v:Alive()
- end
- end)
- hook.Add("PlayerAuthed", "D3A_PlayerAuthed", function(pl,stid,unid)
- print(stid)
- print(unid)
- end)
- hook.Add("EntityRemoved", "ClientsidePlayerDisconnect", function(ply)
- if ply ~= NULL then
- if ply:GetClass() == "player" then
- chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has disconnected.")
- end
- end
- end)
- hook.Add("ClientPlayerSpawn", "D3A_PlayerSpawn", function(ply)
- if ply == NULL then return end
- if ply == LocalPlayer() then return end
- if !ply:IsPlayer() then return end
- chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has spawned.")
- end)
- hook.Add("ClientPlayerInitialSpawn", "D3A_PlayerSpawn", function(ply)
- timer.Simple(0.3, function()
- if ply == NULL then return end
- if !ply:IsPlayer() then return end
- chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has just connected, and spawned.")
- end)
- end)
- hook.Add("ClientPlayerDeath", "D3A_PlayerSpawn", function(ply)
- if ply == NULL then return end
- if !ply:IsPlayer() then return end
- chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has died.")
- end)
Add Comment
Please, Sign In to add comment