Results 1 to 3 of 3
  1. #1
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,519
    Reputation
    13
    Thanks
    1,508
    My Mood
    Asleep

    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
    I Am on this site for the mods for mw2 ONLY. Not hacks.

  2. #2
    geforce210's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    nl
    Posts
    10
    Reputation
    10
    Thanks
    0
    My Mood
    Blah
    huh where need i paste it

  3. #3
    heroeskiller's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    4
    And what does it do?