Triggerbot

Posts 1–4 of 4 · Page 1 of 1
Triggerbot
well i think no one ever released this for crossfire soo here it go:

place it in your intersectsegment hook or use intersectsegment directly.

Code:
void Trigger(CPlayerInfo* pTarget)
	{
		IntersectQuery	iQuery;
		IntersectInfo	iInfo;

		RtlSecureZeroMemory(&iQuery, sizeof(IntersectQuery));
		RtlSecureZeroMemory(&iInfo, sizeof(IntersectInfo));

		D3DXVECTOR3 Src /*your eye position, the best would be your weapon position, where the bullet comes out*/,
			End,
			CameraPos /*the camera pos from playerclient class, there's 3 values which are READONLY, use reclass to find it and use those values*/;

		Math::AngleVectors(CameraPos, &End);

		//TODO: find a way to get your local player weapon id, get the weapon by index and set the weapon range above.

		iQuery.Start = Src;
		iQuery.End = Src + (End * 8162.f/*this value is your gun range btw*/);
		iQuery.Flags = INTERSECT_HPOLY | INTERSECT_OBJECTS | IGNORE_NONSOLID;
		iQuery.FilterIntersectParam = &iQuery;
		//iQuery.FilterIntersectFn; you should implement that too...

		if (oIntersectSegment(iQuery, &iInfo))
		{
			if (iInfo.hObjImpact == pTarget->iObject)
			{
				//shoot
			}
		}
	}
Quote Originally Posted by uNdExEd_CheAtEr View Post
well i think no one ever released this for crossfire soo here it go:

place it in your intersectsegment hook or use intersectsegment directly.

Code:
void Trigger(CPlayerInfo* pTarget)
	{
		IntersectQuery	iQuery;
		IntersectInfo	iInfo;

		RtlSecureZeroMemory(&iQuery, sizeof(IntersectQuery));
		RtlSecureZeroMemory(&iInfo, sizeof(IntersectInfo));

		D3DXVECTOR3 Src /*your eye position, the best would be your weapon position, where the bullet comes out*/,
			End,
			CameraPos /*the camera pos from playerclient class, there's 3 values which are READONLY, use reclass to find it and use those values*/;

		Math::AngleVectors(CameraPos, &End);

		//TODO: find a way to get your local player weapon id, get the weapon by index and set the weapon range above.

		iQuery.Start = Src;
		iQuery.End = Src + (End * 8162.f/*this value is your gun range btw*/);
		iQuery.Flags = INTERSECT_HPOLY | INTERSECT_OBJECTS | IGNORE_NONSOLID;
		iQuery.FilterIntersectParam = &iQuery;
		//iQuery.FilterIntersectFn; you should implement that too...

		if (oIntersectSegment(iQuery, &iInfo))
		{
			if (iInfo.hObjImpact == pTarget->iObject)
			{
				//shoot
			}
		}
	}
Its Seems Like Remote Kill code
But
gj
Quote Originally Posted by (Virus) View Post


Its Seems Like Remote Kill code
But
gj
what it has to do with remote kill? that's how triggerbot works in all games, you just need your point of view and some way to raytrace to an object...
Quote Originally Posted by uNdExEd_CheAtEr View Post
what it has to do with remote kill? that's how triggerbot works in all games, you just need your point of view and some way to raytrace to an object...
nvm him, he seen an IntersectSegment and thought of remote kill.
I did something like that bfore, but I was never able to calculate the endpoint.
The idea of the hook is good though, cause the game makes the calculations for u
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us