Untested GMOD CircleStrafer.

Posts 1–4 of 4 · Page 1 of 1
Untested GMOD CircleStrafer.
Already had one of these for CSGO, thought it might be useful in GMOD HVH. Didn't actually test it, but it should work.
Code:
function RotateMovement(cmd, double)
	double = math.rad(double);
 
	local cos_rot = math.cos(double);
	local sin_rot = math.sin(double);
 
	local new_forwardmove = (cos_rot * cm.GetForwardMove(cmd)) - (sin_rot * cm.GetSideMove(cmd));
	local new_sidemove = (sin_rot * cm.GetSideMove(cmd)) + (cos_rot * cm.GetSideMove(cmd));
 
	cm.SetForwardMove(cmd, new_forwardmove)
	cm.SetSideMove(cmd, new_sidemove);
end

local CircleFactor = 0;
function CircularStrafe(cmd, angle)
	local interval_per_tick = cmd:TickInterval();
	CircleFactor=CircleFactor+1;
	if (CircleFactor > 361) then
		CircleFactor = 0;
 
		local GetItDoubled = 3.0 * CircleFactor - interval_per_tick;
 
		local StoredViewAngles = cm.GetViewAngles(cmd);
		cm.SetViewAngles(cmd, angle);
		RotateMovement(cmd, GetItDoubled);
	end
end
Called with CircularStrafe(cmd, LocalPlayer():EyeAngles()) in your CreateMove hook or however you wanna do it.
Quote Originally Posted by Holy Dank View Post
is this lua?
no it's asm
Quote Originally Posted by Cyaegha View Post
no it's asm
You don't need to tell him that, can't you see his profile pic, he is a "Lua Hacker".
...Maybe you didn't notice because of the horrible photoshop in Microsoft paint
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us