Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local default = 1.5
- -- meta
- local META = FindMetaTable("Player")
- function META:SetSuperJumpMultiplier(mult, dont_update_client)
- check(mult, "number")
- check(dont_update_client, "nil", "boolean")
- self.super_jump_multiplier = mult
- if SERVER and not dont_update_client then
- umsg.Start("bhop", ply)
- umsg.Float(mult)
- umsg.End()
- end
- self:SetDuckSpeed(0.05)
- self:SetUnDuckSpeed(0.05)
- end
- function META:GetSuperJumpMultiplier()
- return self.super_jump_multiplier or default
- end
- --
- --[[ hm = hm or "striderbuster_break"
- function B(s)
- s = s or hm
- hm = s
- PrecacheParticleSystem(s)
- return hm
- end ]]
- -- hook
- local function Move(ply, data)
- local mult = ply:GetSuperJumpMultiplier()
- if mult ~= 1 and ply:IsOnGround() and ply:KeyPressed(IN_JUMP) then
- data:SetVelocity(data:GetVelocity() * mult)
- --if not ply:KeyDown(IN_SPEED) then
- local eye = math.Clamp(ply:EyeAngles().p/89, 0, 1) ^ 3
- if eye > 0.3 then
- data:SetVelocity(LerpVector(eye, data:GetVelocity(), Vector(0.5, 0.5, 1) * data:GetVelocity() + Vector(0,0,data:GetVelocity():Length()*0.3)))
- end
- --print(B(), B)
- --if SERVER then ParticleEffect("ExplosionFlash", ply:GetPos(), Angle(0)) end
- --end
- end
- end
- if SERVER then
- hook.Add("SetupMove", "bhop", Move)
- hook.Add("GetFallDamage", "bhop", function(ply)
- if ply:KeyDown(IN_JUMP) then
- return 0
- end
- end)
- end
- if CLIENT then
- hook.Add("Move", "bhop", Move)
- usermessage.Hook("bhop", function(u)
- LocalPlayer():SetSuperJumpMultiplier(u:ReadFloat())
- end)
- end
- --
- if SERVER then
- RunConsoleCommand("sv_airaccelerate", "1000000")
- RunConsoleCommand("sv_maxvelocity", "20000")
- end
Advertisement
Add Comment
Please, Sign In to add comment