Weapon and Pickups ESP

Posts 14 of 4 · Page 1 of 1
Weapon and Pickups ESP
Can this be useful?

centity_t has both required ID's:
Code:
class centity_t	
...
__int32 pickupId; //0x0280  
...
__int16 weaponId; //0x02B2 
...
For weap names :

Code:
#define ENGINE_CLASS_WEAPONINFO_T 0x2AC720DC


char* CEsp::GetWeaponName(int index)
{
	weapon_t *weapon = ( weapon_t *)(ENGINE_CLASS_WEAPONINFO_T + index * 0x24);
	return (char*) weapon->weaponName;
}


class weapon_t
{
public:
	char unknown0[24]; //0x0000
	char* weaponName; //0x0018  
	char unknown28[8]; //0x001C
}; //Size=0x0024(36)
Usage example:

Code:
if (GMath.WorldToScreen(pEntity.vOrigin, &ScreenX, &ScreenY))
{
	if (Distance <= 30.0f)
	{
		switch(pEntity.eType)
		{
		case ET_MISSILE: // C4, grenades, flash etc

			if (pEntity.isAlive == 4 && pEntity.eFlag == 18)
			{
				char szItemInfo[64];
				sprintf(szItemInfo, " [%.0fm] %s ", Distance, GetWeaponName(pEntity.weaponId));
				GDraw.DrawStringExt(szItemInfo, pFont, ScreenX-(GCommon.GetTextLength(szItemInfo) * 4.555f), ScreenY, (Distance <= 8.0f ? colRed : spectator));
			}

		case ET_ITEM: // dropped weapons

			if (pEntity.isAlive == 3 && pEntity.eFlag == 2 && bPickups)
			{
				char szPickupInfo[64];
				sprintf(szPickupInfo, " [%.0fm] %s ", Distance, GetWeaponName(pEntity.pickupId));
				GDraw.DrawStringExt(szPickupInfo, pFont, ScreenX-(GCommon.GetTextLength(szPickupInfo) * 4.555f), ScreenY, spectator);
			}
		}
	}
}
assasinated posted this also, i dunno who's first?
and this is wrong section mate next time post it in the Coding/Modding section.
im the fisrt one that posted this...
Posts 14 of 4 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?