View Single Post
Immortal_BLG
Member
Join Date: Feb 2010
Location: RUSSIA
Old 04-02-2010 , 20:47   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #3

as bool cell offset == bool offset / 4
as signed/unsigned short cell offset == short offset / 2

Example1: Offset_IsShouldSkipSpawn / 4 == cell offset
Example2: Offset_Score_Terrorist / 2 == cell offset

For me the only problem with Boolean data types, because the patched instance if offset Offset_IsCareerMatch (693) is divide by 4, then the answer will 173.25 ie not an integer, which means that for this offset is necessary to find a valid flag, such as for player offset OFFSET_VIP - as bool it's 837 and check the VIP will look like this:
Code:
((bool *) pPlayer->pvPrivateData)[837] == true
, but as a cell - is 209,25 - ie 209, and now for To check whether a player is VIP, we need to do so
Code:
(((int *) pPlayer->pvPrivateData)[209] & (1 << 8))> 0
P.S. if written "as bool, but BOOL", then this offset can simply be divided by 4 and you get a cell offset because the sizeof (BOOL) is equal 4 bytes

Sorry for BAD English, but how could....

Last edited by Immortal_BLG; 04-02-2010 at 20:59.
Immortal_BLG is offline