Weapon & Pickup esp

Posts 1–3 of 3 · Page 1 of 1
Weapon & Pickup esp
Since no1 has posted this on mpgh, why not leech it?

centity_t has both required Id's:

Code:
class centity_t	
...
__int32 pickupId; //0x0280  
...
__int16 weaponId; //0x02B2 
...
My function and struct you iterate through for the names:


C
Code:
#define ENGINE_CLASS_WEAPONINFO_T 0x2AC720DCchar* 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)
Example usage:

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);
			}
		}
	}
}
Credits:
silverfish
huh where need i paste it
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.
Talk with us