Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GM:OnPlayerHitGround(ply, water)
- if not IsValid(ply) then return end
- local Style = MODE_AUTO
- if CLIENT then
- Style = PlayerMode
- elseif SERVER then
- Style = ply.HopMode
- if ply.LJ then
- if not water then
- LJ.Stats:Complete(ply, ply:GetPos())
- LJ.Stats:Reset(ply)
- else
- LJ.Stats:Reset(ply)
- end
- end
- end
- if Style == MODE_SCROLL then
- ply:SetJumpPower(268.4)
- timer.Simple(0.3, function() ply:SetJumpPower(VEC_JUMPHEIGHT) end)
- end
- local ent = ply:GetGroundEntity()
- if tonumber(ent:GetNWInt("Platform", 0)) == 0 then return end
- if (ent:GetClass() == "func_door" or ent:GetClass() == "func_button") and not LIST_DOORMAPS[game.GetMap()] and ent.BHSp and ent.BHSp > 100 then
- if LIST_BOOSTERS[game.GetMap()] then
- ply:SetVelocity(Vector(0, 0, ent.BHSp * LIST_BOOSTERS[game.GetMap()]))
- else
- ply:SetVelocity(Vector(0, 0, ent.BHSp * 1.9))
- end
- elseif ent:GetClass() == "func_door" || ent:GetClass() == "func_button" then
- timer.Simple(0.04, function()
- ent:SetOwner(ply)
- if CLIENT then
- ent:SetColor(Color(255,255,255,125))
- end
- end)
- timer.Simple(0.7, function() ent:SetOwner(nil) end)
- timer.Simple(0.7, function() if CLIENT then ent:SetColor(Color(255, 255, 255, 255)) end end)
- end
- if (self.BaseClass && self.BaseClass.OnPlayerHitGround) then
- self.BaseClass:OnPlayerHitGround(ply)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement