• Auto Bhop Script?
    6 replies, posted
Hey guys! I have just recently made a new deathrun server. Since I am using blackvoid version for a certain addon it dosent include auto bhop. Can someone help me and/or make me a script for auto bhop on my server? Thanks!
[code] function CanHop( ent ) if ( !ent:KeyDown( IN_JUMP ) ) then return false end if ( LocalPlayer():IsOnGround() ) then return false end if ( LocalPlayer():InVehicle() ) then return false end if ( LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP ) then return false end if ( LocalPlayer():WaterLevel() >= 2 ) then return false end return true end function Bhop( ent ) if ( CanHop( ent ) ) then ent:SetButtons( ent:GetButtons() - IN_JUMP ) end end hook.Add( "CreateMove", "adsadas", Bhop ) [/code]
[QUOTE=Invule;47337795][code] function Bhop( ent ) ent:SetButtons( ent:GetButtons() - IN_JUMP ) end hook.Add( "CreateMove", "asasd", Bhop, ) [/code][/QUOTE] Where should I put that file?
I editted my first post, and in autorun/client/ yeah?
[QUOTE=Invule;47337801]I editted my first post, and in autorun/client/ yeah?[/QUOTE] Beat me to it :(
shared.lua [code] if CLIENT then CreateClientConVar( "deathrun_autojump", 1, true, true ) end local band = bit.band local bor = bit.bor local bnot = bit.bnot hook.Add("SetupMove", "DR_AutoJump", function(ply, uc) if CLIENT and GetConVarNumber( "deathrun_autojump" ) ~= 1 then return end if SERVER and ply:GetInfoNum( "deathrun_autojump", 1 ) ~= 1 then return end if ply:Alive() and ply:GetMoveType() == MOVETYPE_WALK and not ply:InVehicle() and ply:WaterLevel() <= 1 and band(uc:GetButtons(), IN_JUMP) == IN_JUMP then if ply:IsOnGround() then uc:SetButtons( bor( uc:GetButtons(), IN_JUMP) ) else uc:SetButtons( band( uc:GetButtons(), bnot(IN_JUMP)) ) end end end) [/code]
Thanks guys! Appreciate it!
Sorry, you need to Log In to post a reply to this thread.