Login to ZARP
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: [Death RUN] Better Uncrouch System

[Death RUN] Better Uncrouch System 6 years 2 months ago #845793

Server Name:
Deathrun

Suggestion Title:
Replace old uncrouch with a better one (immediate uncrouch)

How would it benefit the server:
will prevent current issues with the uncrouch system examples
1) doing it too quick acts as you hit an invisible wall
2) the massive leap it consists of making people miss certain jumps and that

Potential Issues/Exploits:
non its just a better feature to be added

Additional notes:
literally just prevents any broken features with the existing uncrouch and will make the server slightly better and will probably take 10 minutes to gain the code and to put it in to the server files

:zarp: :zarp:
  • A Good Pianist
  • A Good Pianist's Avatar
  • Offline
  • Spectacular Boarder
  • ZARP VIP Golden Blue Badge
  • A Wob A Bob Bob
  • Posts: 15000
  • Thanks received: 3914
  • Karma: 22
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #845794

:plussp:
  • Magik
  • Magik's Avatar
  • Offline
  • Gold Boarder
  • ZARP VIP
  • ye man
  • Posts: 2691
  • Thanks received: 621
  • Karma: -14
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #845797

:plussp: But why is this in server applications?
  • Nick0GR
  • Nick0GR's Avatar
  • Offline
  • Marvelous Boarder
  • ZARP VIP
  • Posts: 10798
  • Thanks received: 3308
  • Karma: -113

GD+Server Apps Section staff
TS3+Discord Staff
Bhop Super admin
TTT Super admin
Discord: Nick0GR#9038
ex
TTT Super admin
Murder Super admin
PropHunt Head admin
Deathrun admin
SSRP admin
TeamSpeak staff
Server apps + appeal section moderator
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #845802

Nick0GR wrote:
:plussp: But why is this in server applications?

cus i heard they have been ignoring suggestions so its an application therefore if its not dealt with they are just dumb
  • A Good Pianist
  • A Good Pianist's Avatar
  • Offline
  • Spectacular Boarder
  • ZARP VIP Golden Blue Badge
  • A Wob A Bob Bob
  • Posts: 15000
  • Thanks received: 3914
  • Karma: 22
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #845809

:plussp:
  • Micky
  • Micky's Avatar
  • Offline
  • Mythical Boarder
  • ZARP VIP
  • Posts: 5771
  • Thanks received: 7912
  • Karma: -42
Login or register to post a reply.
The following user(s) said Thank You: schnitzel nazi

[Death RUN] Better Uncrouch System 6 years 2 months ago #845815

To be honest I have no issue with the current system but I see a lot of people complaining about it, it would be worth changing it.
  • Jim_Jam
  • Jim_Jam's Avatar
  • Offline
  • Former Community Manager
  • ZARP VIP Golden Blue Badge
  • TTT is my child ❤️
  • Posts: 8585
  • Thanks received: 3491
  • Karma: -32
Login or register to post a reply.
The following user(s) said Thank You: Kaiwaii

[Death RUN] Better Uncrouch System 6 years 2 months ago #845828

local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
  • Windows
  • Windows's Avatar
  • Offline
  • Diamond Boarder
  • ZARP VIP
  • Life isn’t a destination, it’s hell
  • Posts: 3989
  • Thanks received: 963
  • Karma: -5
Last Edit: 6 years 2 months ago by Windows.
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #845830

Moved for you :^).
  • EiPUS
  • EiPUS's Avatar
  • Offline
  • Diamond Boarder
  • ZARP VIP Golden Blue Badge
  • Slip Inside The Eye Of Your Mind
  • Posts: 3833
  • Thanks received: 2035
  • Karma: 14
Ex. SSRP Super Administrator
Ex. Forum Global Moderator
Ex. BHOP Administrator
Ex. TeamSpeak Staff
Ex. Discord staff
Login or register to post a reply.
The following user(s) said Thank You: Jim_Jam

[Death RUN] Better Uncrouch System 6 years 2 months ago #845833

EiPUS wrote:
Moved for you :^).
Omg eipus do his job that is rare! *jok*
  • Nick0GR
  • Nick0GR's Avatar
  • Offline
  • Marvelous Boarder
  • ZARP VIP
  • Posts: 10798
  • Thanks received: 3308
  • Karma: -113

GD+Server Apps Section staff
TS3+Discord Staff
Bhop Super admin
TTT Super admin
Discord: Nick0GR#9038
ex
TTT Super admin
Murder Super admin
PropHunt Head admin
Deathrun admin
SSRP admin
TeamSpeak staff
Server apps + appeal section moderator
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #845850

Im not crouched? :whistle:
- Decent suggestion!
:plussp:
  • SyStem
  • SyStem's Avatar
  • Offline
  • Legendary Member
  • ZARP VIP
  • The Specialist
  • Posts: 3564
  • Thanks received: 982
  • Karma: 53
ex SSRP - Headadministrator
ex Surf - Superadministrator
ex Jailbreak - Administrator
ex Forum - Moderator
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #846036

Go bump immediate crouch is the way forward
  • A Good Pianist
  • A Good Pianist's Avatar
  • Offline
  • Spectacular Boarder
  • ZARP VIP Golden Blue Badge
  • A Wob A Bob Bob
  • Posts: 15000
  • Thanks received: 3914
  • Karma: 22
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #846040

This is in suggestion's section my dude rip u
  • Nick0GR
  • Nick0GR's Avatar
  • Offline
  • Marvelous Boarder
  • ZARP VIP
  • Posts: 10798
  • Thanks received: 3308
  • Karma: -113

GD+Server Apps Section staff
TS3+Discord Staff
Bhop Super admin
TTT Super admin
Discord: Nick0GR#9038
ex
TTT Super admin
Murder Super admin
PropHunt Head admin
Deathrun admin
SSRP admin
TeamSpeak staff
Server apps + appeal section moderator
Last Edit: 6 years 2 months ago by Nick0GR.
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #846042

Nick0GR wrote:
This is in suggestion's section my dude rip u

I'll move it myself
  • A Good Pianist
  • A Good Pianist's Avatar
  • Offline
  • Spectacular Boarder
  • ZARP VIP Golden Blue Badge
  • A Wob A Bob Bob
  • Posts: 15000
  • Thanks received: 3914
  • Karma: 22
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #846686

Windows wrote:
local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
Do you know what that does or are you just copy and pasting like an idiot? Looking at the code on the server right now I see a few small differences mainly with the capping of speed with autohop what ever that does. Its not as simple as just copy and pasting you have to understand what that does. I'll make the one change I can see and see if that makes it any better.
  • EMP
  • EMP's Avatar
  • Offline
  • Community Owner
  • ZARP VIP Golden Blue Badge
  • ZARP Owner/Developer
  • Posts: 2044
  • Thanks received: 3152
  • Karma: -53

To Add me on Steam Click the Image Below!

Login or register to post a reply.
The following user(s) said Thank You: Jeppe, Raeker

[Death RUN] Better Uncrouch System 6 years 2 months ago #846747

EMP wrote:
Windows wrote:
local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
Do you know what that does or are you just copy and pasting like an idiot? Looking at the code on the server right now I see a few small differences mainly with the capping of speed with autohop what ever that does. Its not as simple as just copy and pasting you have to understand what that does. I'll make the one change I can see and see if that makes it any better.

It is the bhop code from Deathrun Neue which should be added to the server and It's almost the same on bhop
  • Windows
  • Windows's Avatar
  • Offline
  • Diamond Boarder
  • ZARP VIP
  • Life isn’t a destination, it’s hell
  • Posts: 3989
  • Thanks received: 963
  • Karma: -5
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #846760

Windows wrote:
EMP wrote:
Windows wrote:
local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
Do you know what that does or are you just copy and pasting like an idiot? Looking at the code on the server right now I see a few small differences mainly with the capping of speed with autohop what ever that does. Its not as simple as just copy and pasting you have to understand what that does. I'll make the one change I can see and see if that makes it any better.

It is the bhop code from Deathrun Neue which should be added to the server and It's almost the same on bhop
So you are copying and pasting like an idiot.
  • Jeppe
  • Jeppe's Avatar
  • Offline
  • Banned
  • ZARP VIP Gold Badge
  • Martyr!
  • Posts: 3200
  • Thanks received: 1154
  • Karma: 16
Studio Banter wrote:
Mage you will always be remembered as the first person to write a fuck you list on Zarp and a bonus for not getting it deleted.
Login or register to post a reply.
The following user(s) said Thank You: Jim_Jam, TheXnator, Raeker

[Death RUN] Better Uncrouch System 6 years 2 months ago #846907

Thomas The Thermonuclear Bomb wrote:
Windows wrote:
EMP wrote:
Windows wrote:
local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
Do you know what that does or are you just copy and pasting like an idiot? Looking at the code on the server right now I see a few small differences mainly with the capping of speed with autohop what ever that does. Its not as simple as just copy and pasting you have to understand what that does. I'll make the one change I can see and see if that makes it any better.

It is the bhop code from Deathrun Neue which should be added to the server and It's almost the same on bhop
So you are copying and pasting like an idiot.

No lol i know what it means
  • Windows
  • Windows's Avatar
  • Offline
  • Diamond Boarder
  • ZARP VIP
  • Life isn’t a destination, it’s hell
  • Posts: 3989
  • Thanks received: 963
  • Karma: -5
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #846954

:support: the current system is pretty stupid
  • Bhavya Shah
  • Bhavya Shah's Avatar
  • Offline
  • Expert Boarder
  • ZARP VIP
  • "Save the tears for when we win!"
  • Posts: 1096
  • Thanks received: 246
  • Karma: -18
Login or register to post a reply.

[Death RUN] Better Uncrouch System 6 years 2 months ago #847820

Windows wrote:
local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
S K I D
  • Clarky
  • Clarky's Avatar
  • Offline
  • Former Community Manager
  • ZARP VIP Gold Badge
  • I love Henny
  • Posts: 16702
  • Thanks received: 9536
  • Karma: 1000
Login or register to post a reply.
The following user(s) said Thank You: EiPUS, SorIe

[Death RUN] Better Uncrouch System 6 years 2 months ago #847824

Clarky wrote:
Windows wrote:
local lp, ft, ct, cap = LocalPlayer, FrameTime, CurTime
local mc, mr, bn, ba, bo, gf = math.Clamp, math.Round, bit.bnot, bit.band, bit.bor, {}
function GM:Move( ply, data )

	-- fixes jump and duck stop
	local og = ply:IsFlagSet( FL_ONGROUND )
	if og and not gf[ ply ] then
		gf[ ply ] = 0
	elseif og and gf[ ply ] then
		gf[ ply ] = gf[ ply ] + 1
		if gf[ ply ] > 4 then
			ply:SetDuckSpeed( 0.4 )
			ply:SetUnDuckSpeed( 0.2 )
		end
	end

	if og or not ply:Alive() then return end
	
	gf[ ply ] = 0
	ply:SetDuckSpeed(0)
	ply:SetUnDuckSpeed(0)

	if not IsValid( ply ) then return end
	if lp and ply ~= lp() then return end
	
	if ply:IsOnGround() or not ply:Alive() then return end
	
	local aim = data:GetMoveAngles()
	local forward, right = aim:Forward(), aim:Right()
	local fmove = data:GetForwardSpeed()
	local smove = data:GetSideSpeed()
	
	if data:KeyDown( IN_MOVERIGHT ) then smove = smove + 500 end
	if data:KeyDown( IN_MOVELEFT ) then smove = smove - 500 end
	
	forward.z, right.z = 0,0
	forward:Normalize()
	right:Normalize()

	local wishvel = forward * fmove + right * smove
	wishvel.z = 0

	local wishspeed = wishvel:Length()
	if wishspeed > data:GetMaxSpeed() then
		wishvel = wishvel * (data:GetMaxSpeed() / wishspeed)
		wishspeed = data:GetMaxSpeed()
	end

	local wishspd = wishspeed
	wishspd = mc( wishspd, 0, 30 )

	local wishdir = wishvel:GetNormal()
	local current = data:GetVelocity():Dot( wishdir )

	local addspeed = wishspd - current
	if addspeed <= 0 then return end

	local accelspeed = 1000 * ft() * wishspeed
	if accelspeed > addspeed then
		accelspeed = addspeed
	end
	
	local vel = data:GetVelocity()
	vel = vel + (wishdir * accelspeed)

	if ply.AutoJumpEnabled == true and GetConVar("deathrun_allow_autojump"):GetBool() == true and GetConVar("deathrun_autojump_velocity_cap"):GetFloat() ~= 0 then
		ply.SpeedCap = GetConVar("deathrun_autojump_velocity_cap"):GetFloat()
	else
		ply.SpeedCap = 99999
	end

	
	if ply.SpeedCap and vel:Length2D() > ply.SpeedCap and SERVER then
		local diff = vel:Length2D() - ply.SpeedCap
		vel:Sub( Vector( vel.x > 0 and diff or -diff, vel.y > 0 and diff or -diff, 0 ) )
	end
	
	data:SetVelocity( vel )
	return false
end
local function AutoHop( ply, data )
	
	if CLIENT then
		LocalPlayer().AutoJumpEnabled = intToBool( GetConVar("deathrun_autojump"):GetInt() )
	end

	if lp and ply ~= lp() then return end
	if ply.AutoJumpEnabled == false or GetConVar("deathrun_allow_autojump"):GetBool() == false then return end
	--print(ply.AutoJumpEnabled)
	
	local ButtonData = data:GetButtons()
	if ba( ButtonData, IN_JUMP ) > 0 then
		if ply:WaterLevel() < 2 and ply:GetMoveType() ~= MOVETYPE_LADDER and not ply:IsOnGround() then
			data:SetButtons( ba( ButtonData, bn( IN_JUMP ) ) )
		end
	end
end
hook.Add( "SetupMove", "AutoHop", AutoHop )
S K I D
thats rich coming from u SIR

eat my ass
  • SorIe
  • SorIe's Avatar
  • Offline
  • Marvelous Boarder
  • ZARP VIP Golden Blue Badge
  • Posts: 10833
  • Thanks received: 4290
  • Karma: 401

ex-dog LT member on many servers

Login or register to post a reply.
  • Page:
  • 1
  • 2
Moderators: MadMagic, Kanna.
Time to create page: 0.173 seconds

211 PLAYERS ONLINE

Connect to server View Gametracker DarkRP 1
9/127
online
Connect to server View Gametracker Deathrun
0/40
online
Connect to server View Gametracker TTT
0/47
online
Connect to server View Gametracker Bhop
1/32
online
Connect to server View Gametracker Surf
3/32
online
Connect to server View Gametracker Prop Hunt
0/42
online
Connect to server View Gametracker Sandbox
0/42
online
Connect to server Discord
198/790
online
Top