Results 1 to 2 of 2
  1. #1
    ic3w0lf22's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    598
    My Mood
    Aggressive

    AutoStrafe | Bhop | Backwards Bhop

    Some variables are from other scripts, anyway, this strafes for you automatically.

    If you're in a sandbox server, for some reason you go really fast with backwards hop enabled.

    The convars are:
    draw_gui [1] by default
    autostrafe_enabled [1] by default
    bhop_enabled [1] by default
    backwards_hop [0] by default

    There may some bugs if you're trying to surf or crouch jump.

    Code:
    local GUI_ENABLED = CreateClientConVar('draw_gui', 1, true, false)
    local A_S = CreateClientConVar('autostrafe_enabled', 1, true, false)
    local B_S = CreateClientConVar('bhop_enabled', 1, true, false)
    local BWH = CreateClientConVar('backwards_hop', 0, true, false)
    
    local G = {}
    G.tbl_Copy = table.Copy
    
    G.mtbl_Find = FindMetaTable
    
    local Meta_UCMD = G.mtbl_Find("CUserCmd")
    local Meta_ENT = G.mtbl_Find("Entity")
    
    local GetMouseY	= Meta_UCMD.GetMouseY
    local GetMouseX	= Meta_UCMD.GetMouseX
    local SetSideMove = Meta_UCMD.SetSideMove
    local RemoveKey = Meta_UCMD.RemoveKey
    local SetButtons = Meta_UCMD.SetButtons
    local GetButtons = Meta_UCMD.GetButtons
    local OnGround = Meta_ENT.IsOnGround
    local WaterLevel = Meta_ENT.WaterLevel
    local GetMoveType = Meta_ENT.GetMoveType
    
    local JUMP = IN_JUMP
    
    hook.Add('HUDPaint', 'BHOP_ENABLED_TEXT', function()
    	if GUI_ENABLED:GetBool() then
    		draw.DrawText('AutoStrafe ' .. (A_S:GetBool() == true and 'Enabled' or 'Disabled') ..
    			'\n BunnyHop ' ..(B_S:GetBool() == true and 'Enabled' or 'Disabled') ..
    			'\n Backwards ' .. (BWH:GetBool() == true and 'Enabled' or 'Disabled'),
    		'TargetID', ScrW() * .5, ScrH() *.1, Color(255,100,100,255), TEXT_ALIGN_CENTER)
    	end
    end)
    
    hook.Add('CreateMove', 'AutoStrafe', function(cmd)
    	if (A_S:GetBool() and cmd:KeyDown(IN_JUMP)) then
    		if (OnGround(LocalPlayer()) and B_S:GetBool()) then
    			SetButtons(cmd, GetButtons(cmd), JUMP)
    		elseif (WaterLevel(LocalPlayer()) < 2 && GetMoveType(LocalPlayer()) ~= MOVETYPE_LADDER && !OnGround(LocalPlayer()) and not string.find(gmod.GetGamemode().Name,'Bunny Hop')) then
    			RemoveKey(cmd, JUMP)
    		end
    		if (GetMouseX(cmd) < 0) then
    			if BWH:GetBool() then
    				SetSideMove(cmd, 10000)
    			else
    				SetSideMove(cmd, -10000)
    			end
    		elseif (GetMouseX(cmd) > 0) then
    			if BWH:GetBool() then
    				SetSideMove(cmd, -10000)
    			else
    				SetSideMove(cmd, 10000)
    			end
    		end
    		if (LocalPlayer():IsOnGround() and not gmod.GetGamemode().Name:find'Bunny Hop') then
    			cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_JUMP));
    			return;
    		end
    	end
    	--cmd:RemoveKey(IN_JUMP);
    end)

  2. #2
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    /Moved to the correct section.

Similar Threads

  1. [Detected] ZombieWizzad Public BHOP v1.0 - AutoHop & AutoStrafe
    By ZombieWizzard in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 25
    Last Post: 03-24-2015, 03:33 PM
  2. [Release] A bhop with autostrafe
    By blackstab1337 in forum Garry's Mod Hacks & Cheats
    Replies: 22
    Last Post: 10-17-2014, 06:22 PM
  3. Krolek - A Autostrafe and Bhop GMod, CSS Hack!
    By kittydecat in forum Garry's Mod Hacks & Cheats
    Replies: 20
    Last Post: 05-16-2014, 11:44 PM
  4. [Release] Yolo's Bhop Hack (includes autostrafer)
    By bowlcut in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 24
    Last Post: 10-29-2013, 12:57 AM
  5. [Patched] Yolo's Bhop Hack (includes autostrafer) - UPDATED
    By Autoithacks in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 36
    Last Post: 02-05-2013, 11:12 PM