Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. function GM:OnPlayerHitGround(ply, water)
  2. if not IsValid(ply) then return end
  3.  
  4. local Style = MODE_AUTO
  5. if CLIENT then
  6. Style = PlayerMode
  7. elseif SERVER then
  8. Style = ply.HopMode
  9.  
  10. if ply.LJ then
  11. if not water then
  12. LJ.Stats:Complete(ply, ply:GetPos())
  13. LJ.Stats:Reset(ply)
  14. else
  15. LJ.Stats:Reset(ply)
  16. end
  17. end
  18. end
  19.  
  20. if Style == MODE_SCROLL then
  21. ply:SetJumpPower(268.4)
  22. timer.Simple(0.3, function() ply:SetJumpPower(VEC_JUMPHEIGHT) end)
  23. end
  24.  
  25. local ent = ply:GetGroundEntity()
  26. if tonumber(ent:GetNWInt("Platform", 0)) == 0 then return end
  27. if (ent:GetClass() == "func_door" or ent:GetClass() == "func_button") and not LIST_DOORMAPS[game.GetMap()] and ent.BHSp and ent.BHSp > 100 then
  28. if LIST_BOOSTERS[game.GetMap()] then
  29. ply:SetVelocity(Vector(0, 0, ent.BHSp * LIST_BOOSTERS[game.GetMap()]))
  30. else
  31. ply:SetVelocity(Vector(0, 0, ent.BHSp * 1.9))
  32. end
  33. elseif ent:GetClass() == "func_door" || ent:GetClass() == "func_button" then
  34. timer.Simple(0.04, function()
  35. ent:SetOwner(ply)
  36. if CLIENT then
  37. ent:SetColor(Color(255,255,255,125))
  38. end
  39. end)
  40. timer.Simple(0.7, function() ent:SetOwner(nil) end)
  41. timer.Simple(0.7, function() if CLIENT then ent:SetColor(Color(255, 255, 255, 255)) end end)
  42. end
  43.  
  44. if (self.BaseClass && self.BaseClass.OnPlayerHitGround) then
  45. self.BaseClass:OnPlayerHitGround(ply)
  46. end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement