View Single Post
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-10-2015 , 08:36   Re: [Metamod] Get Private Data Index
Reply With Quote #2

Quote:
Originally Posted by DavidJr View Post
I tried this but gets the wrong result, how to get it correct?

PHP Code:
int iEnt NULL;
iEnt = *((int *)pEnt->pvPrivateData 367 2); //rgpPlayerItemsSlot0 + 2

Util.Print_Console(pEnt"Error %d\n"iEnt); 
To get INT value.

PHP Code:
int Value 0;

#if !defined(__linux__)
  
Value = *((int *)pEntity->pvPrivateData OFFSET_ID);
#else
  
Value = *((int *)pEntity->pvPrivateData OFFSET_ID OFFSET_LINUX);
#endif 
Sometimes, OFFSET_ID can be a mix like (OFFSET_SOMETHING + OFFSET_SOMETHING_ELSE) and OFFSET_LINUX can be 4 (for Weapon edicts on Linux).
Have you browsed CStrike?
__________________

Last edited by claudiuhks; 05-10-2015 at 08:41.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks