Nospread C++

Posts 1–9 of 9 · Page 1 of 1
Nospread C++
Code:
#include "Main.h"

namespace NoSpread
{
	void AngleVectors( Vector angles, Vector &forward, Vector &right, Vector &up) {
		float		angle;
		static float		sr, sp, sy, cr, cp, cy;

		angle = angles[1] * (M_PI * 2 / 360);
		sy = sin(angle);
		cy = cos(angle);
		angle = angles[0] * (M_PI * 2 / 360);
		sp = sin(angle);
		cp = cos(angle);
		angle = angles[2] * (M_PI * 2 / 360);
		sr = sin(angle);
		cr = cos(angle);

		forward[0] = cp*cy;
		forward[1] = cp*sy;
		forward[2] = -sp;

		right[0] = (-1 * sr*sp*cy + -1 * cr*-sy);
		right[1] = (-1 * sr*sp*sy + -1 * cr*cy);
		right[2] = -1 * sr*cp;

		up[0] = (cr*sp*cy + -sr*-sy);
		up[1] = (cr*sp*sy + -sr*cy);
		up[2] = cr*cp;
	}
	void Compensate(int SeedTime)
	{
		centity_t* local = centity_t::GetInstance(Globals::cg->GetClientNum());
		clientInfo_t* local_info = clientInfo_t::GetInstance(Globals::cg->GetClientNum());
		
		int serverTimeSeed = SeedTime;
		Utils::MemCall<int*>(offsets.HashSeed).CdeclCall<void>(&serverTimeSeed);

		float flRange = 8192.0f;

		float minSpread, maxSpread;
		Utils::MemCall<playerState_s*, int, float*, float*>(offsets.BG_GetSpreadForWeapon).CdeclCall<void>(Globals::playerState, local->GetWeaponID(), &minSpread, &maxSpread);
		Vector RefAngles = local_info->GetViewAngle();

		float Spread = Globals::cg->Spread() * 0.0039215689f;

		auto v14 = Utils::MemCall<int>(0x5846F0).CdeclCall<int>(local->GetWeaponID());

		if (*(float*)((int)Globals::playerState + 0x1E0) == 1.0f)
			Spread = (float)((float)(maxSpread - *(float *)(v14 + 2016)) * Spread) + *(float *)(v14 + 2016);
		else
			Spread = (tan((minSpread + ((maxSpread - minSpread) * Spread)) *  0.017453292f)) * flRange;

		float right, up;
		auto v23 = Utils::MemCall<int*>(0x6A3490).CdeclCall<float>(&serverTimeSeed) * 360.0f;
		Utils::MemCall<int*>(0x4F38A0).CdeclCall<void>(&serverTimeSeed);
		auto v26 = Utils::MemCall<int*>(0x6A3490).CdeclCall<float>(&serverTimeSeed);
		v23 = v23 * 0.017453292f;

		right = cos(v23) * v26 * Spread;
		up = sin(v23) * v26 * Spread;

		Vector dir, forward, vRight, vUp;
		Vector Ang = local_info->GetViewAngle();

		AngleVectors(Ang, forward, vRight, vUp);

		dir[0] = (forward[0] * flRange) + (vRight[0] * right) + (vUp[0] * up);
		dir[1] = (forward[1] * flRange) + (vRight[1] * right) + (vUp[1] * up);
		dir[2] = (forward[2] * flRange) + (vRight[2] * right) + (vUp[2] * up);

		Vector tmp;
		dir.VectorToAngle();

		Globals::UserCmd->angles[0] += ANGLE2SHORT(Ang[0] - dir[0]);
		Globals::UserCmd->angles[1] += ANGLE2SHORT(Ang[1] - dir[1]);
	}
}
Credits: @S4itama
Nice paste kid, give credits to @S4itama atleast, wow look that he can download the zip and extract it and copy the source and post it, i bet you do not even know how to use that...
Quote Originally Posted by niko1921 View Post
Nice paste kid, give credits to @S4itama atleast, wow look that he can download the zip and extract it and copy the source and post it, i bet you do not even know how to use that...
Edited as requested.
Quote Originally Posted by niko1921 View Post
Nice paste kid, give credits to @S4itama atleast, wow look that he can download the zip and extract it and copy the source and post it, i bet you do not even know how to use that...
he knows how 2 use it very well, have been using his private cheats for a while
Quote Originally Posted by erlwarrior View Post
he knows how 2 use it very well, have been using his private cheats for a while
yeh, 3 legit 5 me, he know how use it... what is wrong with people today....
Quote Originally Posted by niko1921 View Post
yeh, 3 legit 5 me, he know how use it... what is wrong with people today....
y u salt?
Quote Originally Posted by Recigy View Post
y u salt?
dude, i know that your "private hack" it's pasted, oh casually, a guy releases his sources on other forum and now everyone has coded "his own bot"... and no, i'm not salt... cheers
Quote Originally Posted by niko1921 View Post
dude, i know that your "private hack" it's pasted, oh casually, a guy releases his sources on other forum and now everyone has coded "his own bot"... and no, i'm not salt... cheers
am 48 year man from somalia
I selled my wife for internet conection
Quote Originally Posted by niko1921 View Post
Nice paste kid, give credits to @S4itama atleast, wow look that he can download the zip and extract it and copy the source and post it, i bet you do not even know how to use that...
x(



- - - Updated - - -

Quote Originally Posted by Recigy View Post
y u salt?
SALLLTTTTTTTTTTTTTTTTTTTT

Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us