Login to ZARP
Username: Password: Remember me

TOPIC: Bhop Suggestion - Crouch Bug

Bhop Suggestion - Crouch Bug 1 week 3 hours ago #1334594

Server Name:

Bhop

Suggestion Title:

Fix Crouch bug

How would it benefit the server:

Stop people coming to a complete stand still when uncrouching. **this does not happen every time**

Potential Issues/Exploits:

N/A

Additional notes:
When Onion was owner he had taken this and implemented it for a day then removed it. Please add it back to the server :)

If there is any issue with the code, please let me know and ill look into it myself :)

*This is not my code* Fix for the crouch bug:
function GM:Move( ply, data )
    if not IsValid( ply ) then return end
    if LocalPlayer and ply != LocalPlayer() then return end
    
    local style = ply:GetNWInt("style")
    if ply:IsOnGround() and not OnGround[ ply ] then
        OnGround[ply] = 0
    elseif ply:IsOnGround() and OnGround[ply] then
        OnGround[ply] = OnGround[ply] + 1
        if OnGround[ply] > 12 then
            //ply:SetDuckSpeed( 0.4 )
            //ply:SetUnDuckSpeed( 0.2 )
        end
    elseif not ply:IsOnGround() then
        OnGround[ply] = 0
        //ply:SetDuckSpeed( 0 )
        //ply:SetUnDuckSpeed( 0 )
    end
  • RhysA
  • RhysA's Avatar
  • Offline
  • Expert Boarder
  • Ambassador
  • chad
  • Posts: 1576
  • Thanks received: 534
  • Karma: 10

The topic has been locked.
The following user(s) said Thank You: Skippergroe

Bhop Suggestion - Crouch Bug 1 week 3 hours ago #1334597

"The crouch is perfectly fine"

Get this done please and thank you !
  • L3mon
  • L3mon's Avatar
  • Offline
  • Senior Boarder
  • washed
  • Posts: 609
  • Thanks received: 203
  • Karma: 1
The topic has been locked.
The following user(s) said Thank You: RhysA

Bhop Suggestion - Crouch Bug 1 week 3 hours ago #1334598

never was removed

edit: however, i will look into it again
  • OnionRings
  • OnionRings's Avatar
  • Offline
  • Community Manager
  • ZARP VIP
  • Posts: 9740
  • Thanks received: 4325
  • Karma: -555
Community Manager
Discord: OnionRings#9355
Last Edit: 1 week 3 hours ago by OnionRings.
The topic has been locked.
The following user(s) said Thank You: RhysA, Markus, Skippergroe

Bhop Suggestion - Crouch Bug 1 week 3 hours ago #1334599

OnionRings wrote:
never was removed

edit: however, i will look into it again

Im sure it was removed :/
  • RhysA
  • RhysA's Avatar
  • Offline
  • Expert Boarder
  • Ambassador
  • chad
  • Posts: 1576
  • Thanks received: 534
  • Karma: 10

The topic has been locked.

Bhop Suggestion - Crouch Bug 6 days 8 hours ago #1334697

Here is another fix in case the one RhysA posted doesn't work:
local ticksOnGround, onGround, inAir = {}, {}, {}
 
hook.Add ("Move", "CrouchBugFix", function( ply, data )
	if not IsFirstTimePredicted() then return end
 
    if ply:IsOnGround() then
        if ticksOnGround[ ply ] then
            if ticksOnGround[ ply ] > 12 then
                if not onGround[ ply ] then
                    ply:SetDuckSpeed(0.4)
                    ply:SetUnDuckSpeed(0.2)
 
                    onGround[ ply ] = true
                end
            else
                ticksOnGround[ ply ] = ticksOnGround[ ply ] + 1
 
                if ticksOnGround[ ply ] == 1 then
                    inAir[ ply ] = nil
                elseif ticksOnGround[ ply ] > 1 and data:KeyDown( IN_JUMP ) then
                    local vel = data:GetVelocity()
                    vel.z = ply:GetJumpPower()
 
                    ply:SetDuckSpeed( 0 )
                    ply:SetUnDuckSpeed( 0 )
 
                    ticksOnGround[ ply ] = 0
 
                    data:SetVelocity( vel )
                end
            end
        else
            ticksOnGround[ ply ] = 0
        end
    elseif not inAir[ ply ] then
        ticksOnGround[ ply ] = 0
        onGround[ ply ] = nil
        inAir[ ply ] = true
 
        ply:SetDuckSpeed( 0 )
        ply:SetUnDuckSpeed( 0 )
    end
end )
 
hook.Add ("PlayerDisconnect", "RemoveCrouchBugFix", function( ply )
    ticksOnGround[ ply ] = nil
    onGround[ ply ] = nil
    inAir[ ply ] = nil
end )
  • Knuthulhu
  • Knuthulhu's Avatar
  • Offline
  • Senior Boarder
  • Ambassador
  • I'm a better surfer than you
  • Posts: 413
  • Thanks received: 115
  • Karma: 8
[Pharaoh] prince nyx: i simp for knu

I simp for Nyx
Last Edit: 6 days 8 hours ago by Knuthulhu.
The topic has been locked.
The following user(s) said Thank You: OnionRings, RhysA, Skippergroe

Bhop Suggestion - Crouch Bug 6 days 7 hours ago #1334706

OnionRings wrote:
never was removed

edit: however, i will look into it again

Either way, The bug is still there
  • KingofSaiyans
  • KingofSaiyans's Avatar
  • Offline
  • Senior Boarder
  • Ambassador
  • I might be a fan of Maisie Williams.
  • Posts: 659
  • Thanks received: 160
  • Karma: 1
Ex deathrun mod x2
Ex deahtrun admin x2
Ex deathrun SA x1
Ex bhop mod x1
Ex TS staff x1
The topic has been locked.

Bhop Suggestion - Crouch Bug 6 days 6 hours ago #1334730

I remember complaining of this 2 years ago and being told it was fixed
  • Markus
  • Markus's Avatar
  • Offline
  • Adept Boarder
  • Ambassador
  • Posts: 4455
  • Thanks received: 1090
  • Karma: -89
The topic has been locked.

Bhop Suggestion - Crouch Bug 6 days 6 hours ago #1334731

:plussp:

yes
  • rroobbiinn10xx
  • rroobbiinn10xx's Avatar
  • Offline
  • Gold Boarder
  • Ambassador
  • Junrey Balawing
  • Posts: 3075
  • Thanks received: 935
  • Karma: 36
The topic has been locked.

Bhop Suggestion - Crouch Bug 5 days 1 hour ago #1334928

I believed to of fixed it again(hopefully) :unsure: , It will be on the server within the next few days :silly:
  • OnionRings
  • OnionRings's Avatar
  • Offline
  • Community Manager
  • ZARP VIP
  • Posts: 9740
  • Thanks received: 4325
  • Karma: -555
Community Manager
Discord: OnionRings#9355
The topic has been locked.
The following user(s) said Thank You: RhysA, Alit, seggs
Time to create page: 0.102 seconds

144 PLAYERS ONLINE

Connect to server View Gametracker DarkRP 1
14/128
online
Connect to server View Gametracker DarkRP USA
4/128
online
Connect to server View Gametracker Deathrun
0/40
online
Connect to server View Gametracker TTT
0/47
online
Connect to server View Gametracker TTT USA
0/47
online
Connect to server View Gametracker Bhop
7/32
online
Connect to server View Gametracker Surf
2/32
online
Connect to server View Gametracker Prop Hunt
0/42
online
Copy IP to Clipboard View Gametracker Minecraft
0/128
online
Connect to server View Gametracker TeamSpeak
17/128
online
Connect to server Discord
100/∞
online
Top