InfoLua NoSpread

Posts 1–8 of 8 · Page 1 of 1
Lua NoSpread
Code:
require("spreadthebutter");
local Original_FireBullets = debug.getregistry().Entity.FireBullets;
debug.getregistry().Entity.FireBullets = function(...)
	hook.Call("FireBullets", GAMEMODE || GM || _G || {}, ...);
	Original_FireBullets(...);
end

local tblCones = {
	["weapon_smg1"] = -0.04362,
	["weapon_pistol"] = -0.0100,
	["weapon_ar2"] = 0.02618
};

local function Hooked_FireBullets(pEntity, bulletInfo, suppressHostEvents)
	if (!pEntity) then
		return;
	end
	if (!IsValid(pEntity)) then
		return;
	end
	if (pEntity != LocalPlayer()) then
		return;
	end

	local pWeapon = pEntity:GetActiveWeapon() || nil;
	if (!pWeapon) then
		return;
	end
	if (!IsValid(pWeapon)) then
		return;
	end
	local strWeaponClass = pWeapon:GetClass() || "unknown_class";
	local flWeaponCone = bulletInfo.Spread || 0.0;
	tblCones[strWeaponClass] = flWeaponCone;
end
hook.Add("FireBullets", "Hooked_FireBullets", Hooked_FireBullets);

local function PredictSpread(CUserCmd, angAngle)
	local pWeapon = LocalPlayer():GetActiveWeapon() || nil;
	if (!pWeapon) then
		return angAngle;
	end
	if (!IsValid(pWeapon)) then
		return angAngle;
	end
	local strWeaponClass = pWeapon:GetClass() || "unknown_class";

	if (tblCones[strWeaponClass]) then
		local angCone = Angle(0, 0, 0);
		local outCone = tblCones[strWeaponClass];
		local bIsNumber = tonumber(outCone);
		local bIsVector = (type(outCone) == "Vector");

		if (bIsNumber) then
			angCone = Vector(-outCone, -outCone, -outCone);
		elseif (bIsVector) then
			angCone = outCone * -1;
		end

		return DS_manipulateShot(DS_md5PseudoRandom(CUserCmd:CommandNumber()), angAngle:Forward(), angCone):Angle() || angAngle;
	end

	return angAngle;
end
Have fun pasting this into your garbage cheat.
is this like the 100th release of spread the butter its ancient
Quote Originally Posted by max1612 View Post
is this like the 100th release of spread the butter its ancient
Still waiting for hvh.
thank u kona i succesfully implemented this into trafficbot v3.4 private edition
liquid sox ill hvh you XD
Quote Originally Posted by dakilla345 View Post
liquid sox ill hvh you XD
Send me your steam
very nice and c o o l ... never done before ...

nice hungarian notation
this made my garbage cheat not garbage
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us