Results 1 to 4 of 4
  1. #1
    Cereal Guy's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    8
    My Mood
    Amazed

    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);
    			}
    		}
    	}
    }

  2. #2
    Leaf's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    the Netherlands.
    Posts
    2,059
    Reputation
    456
    Thanks
    417
    My Mood
    Cheerful
    assasinated posted this also, i dunno who's first?
    Ex-



    Previous Names: Leaf, Acinonyx, Fawkes.


  3. The Following User Says Thank You to Leaf For This Useful Post:

    Cereal Guy (02-05-2011)

  4. #3
    Skyline.'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    10,160
    Reputation
    416
    Thanks
    1,614
    and this is wrong section mate next time post it in the Coding/Modding section.


  5. #4
    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
    im the fisrt one that posted this...
    I Am on this site for the mods for mw2 ONLY. Not hacks.