Guest User

Untitled

a guest
Apr 25th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. hook.Add("Think", "PlayerSpawn", function()
  2. for k,v in pairs(player.GetAll()) do
  3. if !v.IsAlive then
  4. hook.Call("ClientPlayerInitialSpawn", GAMEMODE,v)
  5. v.IsAlive = v:Alive()
  6. return
  7. end
  8.  
  9. if v.IsAlive ~= v:Alive() then
  10. if v:Alive() == true then
  11. hook.Call("ClientPlayerSpawn", GAMEMODE, v)
  12. else
  13. hook.Call("ClientPlayerDeath", GAMEMODE,v)
  14. end
  15. end
  16. v.IsAlive = v:Alive()
  17. end
  18. end)
  19.  
  20. hook.Add("PlayerAuthed", "D3A_PlayerAuthed", function(pl,stid,unid)
  21. print(stid)
  22. print(unid)
  23. end)
  24.  
  25. hook.Add("EntityRemoved", "ClientsidePlayerDisconnect", function(ply)
  26. if ply ~= NULL then
  27. if ply:GetClass() == "player" then
  28. chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has disconnected.")
  29. end
  30. end
  31. end)
  32.  
  33. hook.Add("ClientPlayerSpawn", "D3A_PlayerSpawn", function(ply)
  34. if ply == NULL then return end
  35. if ply == LocalPlayer() then return end
  36. if !ply:IsPlayer() then return end
  37. chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has spawned.")
  38. end)
  39.  
  40. hook.Add("ClientPlayerInitialSpawn", "D3A_PlayerSpawn", function(ply)
  41. timer.Simple(0.3, function()
  42. if ply == NULL then return end
  43. if !ply:IsPlayer() then return end
  44. 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.")
  45. end)
  46. end)
  47.  
  48. hook.Add("ClientPlayerDeath", "D3A_PlayerSpawn", function(ply)
  49. if ply == NULL then return end
  50. if !ply:IsPlayer() then return end
  51. chat.AddText(Color(0,255,0),"[Divinity Logging]", team.GetColor(ply:Team()), " " ..ply:Nick() or ply:Name(), Color(255,255,255), " has died.")
  52. end)
Add Comment
Please, Sign In to add comment