Raised This Month: $51 Target: $400
 12% 

Pointer to g_pGameRules and it's offsets


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-15-2012 , 10:59   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #11

That's something (structure) you would use in a module. Members you can use from the CHalfLifeMultiplay class address (g_pGameRules or return of InstallGameRules()). More convenient to have a structure instead of defining the offsets.

Of course, you can access too in a Pawn plugin. I use some offset in Round Terminator for example.

Though he should have put the full offset instead (here it's divided by the offset type), because it's such value which will be needed.
__________________

Last edited by Arkshine; 05-15-2012 at 11:04.
Arkshine is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-18-2012 , 12:54   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #12

Oh okay that's cool I looked into your coding So is the only way to access them through using OrpheuMemoryGetAtAddress() ?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-18-2012 , 13:53   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #13

Quote:
Originally Posted by hornet View Post
Oh okay that's cool I looked into your coding So is the only way to access them through using OrpheuMemoryGetAtAddress() ?
Unless someone make the equivalent in rage, yes.
You can also directly use that structure if you make a module.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 05-30-2014 , 22:24   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #14

What is the name m_bfirstconnected from struct CHalfLifeMultiplay_s?
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-31-2014 , 03:32   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #15

This used in CHalfLifeMultiplay::CheckWinConditions, to check whether game is commenced or not.

It's set to 1 after Game_Commencing event has been triggered.
__________________

Last edited by Arkshine; 05-31-2014 at 03:32.
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 05-31-2014 , 04:04   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #16

I know. I mean, I can get the value of this variable from CHalfLifeMultiplay_s ( Post 9 ) ?
I thought the name of the variable in the structure of another.
__________________

Last edited by Bos93; 05-31-2014 at 04:04.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-31-2014 , 04:16   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #17

Here a full list with real names:

PHP Code:
    BOOL                        m_bFreezePeriod;                    /*     4     4 */
    
BOOL                        m_bBombDropped;                     /*     8     4 */
    
CVoiceGameMgr               m_VoiceGameMgr;                     /*    12     0 */

    
float                       m_fTeamCount;                       /*    40     4 */
    
float                       m_flCheckWinConditions;             /*    44     4 */
    
float                       m_fRoundCount;                      /*    48     4 */
    
int                         m_iRoundTime;                       /*    52     4 */
    
int                         m_iRoundTimeSecs;                   /*    56     4 */
    
int                         m_iIntroRoundTime;                  /*    60     4 */
    
float                       m_fIntroRoundCount;                 /*    64     4 */

    
int                         m_iAccountTerrorist;                /*    68     4 */
    
int                         m_iAccountCT;                       /*    72     4 */

    
int                         m_iNumTerrorist;                    /*    76     4 */
    
int                         m_iNumCT;                           /*    80     4 */
    
int                         m_iNumSpawnableTerrorist;           /*    84     4 */
    
int                         m_iNumSpawnableCT;                  /*    88     4 */
    
int                         m_iSpawnPointCount_Terrorist;       /*    92     4 */
    
int                         m_iSpawnPointCount_CT;              /*    96     4 */

    
int                         m_iHostagesRescued;                 /*   100     4 */
    
int                         m_iHostagesTouched;                 /*   104     4 */

    
int                         m_iRoundWinStatus;                  /*   108     4 */
    
short int                   m_iNumCTWins;                       /*   112     2 */
    
short int                   m_iNumTerroristWins;                /*   114     2 */

    
bool                        m_bTargetBombed;                    /*   116     1 */
    
bool                        m_bBombDefused;                     /*   117     1 */

    
bool                        m_bMapHasBombTarget;                /*   118     1 */
    
bool                        m_bMapHasBombZone;                  /*   119     1 */
    
bool                        m_bMapHasBuyZone;                   /*   120     1 */
    
bool                        m_bMapHasRescueZone;                /*   121     1 */
    
bool                        m_bMapHasEscapeZone;                /*   122     1 */
    
int                         m_iMapHasVIPSafetyZone;             /*   124     4 */
    
int                         m_bMapHasCameras;                   /*   128     4 */

    
int                         m_iC4Timer;                         /*   132     4 */
    
int                         m_iC4Guy;                           /*   136     4 */

    
int                         m_iLoserBonus;                      /*   140     4 */
    
int                         m_iNumConsecutiveCTLoses;           /*   144     4 */
    
int                         m_iNumConsecutiveTerroristLoses;    /*   148     4 */

    
float                       m_fMaxIdlePeriod;                   /*   152     4 */
    
int                         m_iLimitTeams;                      /*   156     4 */
    
bool                        m_bLevelInitialized;                /*   160     1 */
    
bool                        m_bRoundTerminating;                /*   161     1 */
    
bool                        m_bCompleteReset;                   /*   162     1 */

    
float                       m_flRequiredEscapeRatio;            /*   164     4 */
    
int                         m_iNumEscapers;                     /*   168     4 */
    
int                         m_iHaveEscaped;                     /*   172     4 */

    
bool                        m_bCTCantBuy;                       /*   176     1 */
    
bool                        m_bTCantBuy;                        /*   177     1 */

    
float                       m_flBombRadius;                     /*   180     4 */

    
int                         m_iConsecutiveVIP;                  /*   184     4 */

    
int                         m_iTotalGunCount;                   /*   188     4 */
    
int                         m_iTotalGrenadeCount;               /*   192     4 */
    
int                         m_iTotalArmourCount;                /*   196     4 */

    
int                         m_iUnBalancedRounds;                /*   200     4 */
    
int                         m_iNumEscapeRounds;                 /*   204     4 */

    
int                         m_iMapVotes[100];                   /*   208   400 */
    
int                         m_iLastPick;                        /*   608     4 */
    
int                         m_iMaxMapTime;                      /*   612     4 */
    
int                         m_iMaxRounds;                       /*   616     4 */
    
int                         m_iTotalRoundsPlayed;               /*   620     4 */
    
int                         m_iMaxRoundsWon;                    /*   624     4 */

    
int                         m_iStoredSpectValue;                /*   628     4 */
    
float                       m_flForceCameraValue;               /*   632     4 */
    
float                       m_flForceChaseCamValue;             /*   636     4 */
    
float                       m_flFadeToBlackValue;               /*   640     4 */

    
CBasePlayer                 *m_pVIP;                            /*   644     4 */
    
CBasePlayer                 *VIPQueue[5];                       /*   648    20 */

    
float                       m_flIntermissionEndTime;            /*   668     4 */
    
float                       m_flIntermissionStartTime;          /*   672     4 */
    
BOOL                        m_iEndIntermissionButtonHit;        /*   676     4 */

    
float                       m_tmNextPeriodicThink;              /*   680     4 */
    
bool                        m_bFirstConnected;                  /*   684     1 */
    
bool                        m_bInCareerGame;                    /*   685     1 */
    
float                       m_fCareerRoundMenuTime;             /*   688     4 */
    
int                         m_iCareerMatchWins;                 /*   692     4 */
    
int                         m_iRoundWinDifference;              /*   696     4 */
    
float                       m_fCareerMatchMenuTime;             /*   700     4 */
    
bool                        m_bSkipSpawn;                       /*   704     1 */ 
__________________

Last edited by Arkshine; 05-31-2014 at 04:19.
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 05-31-2014 , 04:37   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #18

int m_iCareerMatchWins; /* 692 4 */

692 is not correct? because m_bfirstconnected have offset 692

where is m_bfirstconnected ?
__________________

Last edited by Bos93; 05-31-2014 at 04:40.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-31-2014 , 05:05   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #19

Forgot to say, but it's linux byte-based offset.

m_bFirstConnected is 684. +8 so 692 under windows.
__________________
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 05-31-2014 , 05:07   Re: Pointer to g_pGameRules and it's offsets
Reply With Quote #20

Thanks
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode