QuestionSolvedHow to change aim speed?

Posts 1–4 of 4 · Page 1 of 1
How to change aim speed?
Can someone show me how I do to change ''''''speed'''' to 1 or 0.05 without having to restart the lua file and change number. Example Hack speed 0.05 or Hack speed 1

Code:
local aim = false

function Hack_Metro_sniperaimbot()
	t_sniperaim =! t_sniperaim
	
	if t_sniperaim then
		LocalPlayer():ChatPrint("Sniper Aimbot Enabled")
	else
		LocalPlayer():ChatPrint("Sniper Aimbot Disabled")
	end
	
end

concommand.Add("Hack_Metro_sniperaimbot", Hack_Metro_sniperaimbot)


local function gethead(ent)
	if ent:LookupBone("ValveBiped.Bip01_Head1") then
	local pos = ent:GetBonePosition(ent:GetHitBoxBone(0, 0))
		return pos
	end
	return ent:LocalToWorld(ent:OBBCenter())
end


CreateClientConVar("aim_speedt", 0)

--concommand.Add("aim_speed+", function()
--	RunConsoleCommand("aim_speed+", ""..GetConVarNumber("aim_speedt") + 0.5)
--	LocalPlayer():ChatPrint("Speed is: "..GetConVarNumber("aim_speedt"))
--end)

--concommand.Add("aim_speed-", function()
--	RunConsoleCommand("aim_speed-", ""..GetConVarNumber("aim_speedv") - 0.5)
--	LocalPlayer():ChatPrint("Speed is: "..GetConVarNumber("aim_speedt"))
--end)

local function sniperaimbot(ucmd)
	local myang = LocalPlayer():GetAngles() //FOV checks are borrowed from FapHack

	
	if input.IsMouseDown(MOUSE_LEFT) or aim == true then
		local ply = LocalPlayer()
		local target = nil;
		for k, ent in next, player.GetAll() do
			if (!IsValid(ent) || ent:GetFriendStatus() == "friend" || ent:InVehicle() || ent == LocalPlayer() || !ent:Alive() || ent:IsNPC() || ent:Team() == TEAM_SPECTATOR) then
				continue
			end

			local ang = (ent:GetPos() - LocalPlayer():GetPos()):Angle()
			local angdiffy = math.abs(math.NormalizeAngle(myang.y - ang.y ))
			local angdiffp = math.abs(math.NormalizeAngle(myang.p - ang.p ))
		
			if (angdiffy < 5 and angdiffp < 5) then
				target = ent
			end
		end
		if (target != nil and t_sniperaim) then
			local angle = (gethead(target) - LocalPlayer():GetShootPos()):Angle()
			angle.p = math.NormalizeAngle(angle.p)
			angle.y = math.NormalizeAngle(angle.y)
			ucmd:SetViewAngles(Lerp(''''''speed'''', ucmd:GetViewAngles(), angle)) -- '''''speed'''''' normal value is 1.0 or 0.05
		end
		end
	end
/Moved to the correct section.
Looks to me like there's already an option...
CreateClientConVar("aim_speedt", 0)
1 week has passed and no further replies have been made by the OP. Assuming solved.

/Closed.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?