I just do the same thing like what infinite round does, but m_fFreezePeriod doesn't work, other seems work fine.
Here is my code:
PHP Code:
new g_pGameRules;
public plugin_precache()
{
OrpheuRegisterHook(OrpheuGetFunction("InstallGameRules"), "OnInstallGameRules", OrpheuHookPost);
}
public OnInstallGameRules()
{
g_pGameRules = OrpheuGetReturn();
}
public plugin_init()
{
register_concmd("test", "CmdTest");
}
public CmdTest()
{
new m_iNumCT = OrpheuMemoryGetAtAddress(g_pGameRules, "m_iNumCT");
server_print("m_iNumCT is %i", m_iNumCT);
new m_fFreezePeriod = OrpheuMemoryGetAtAddress(g_pGameRules, "m_fFreezePeriod");
server_print("m_fFreezePeriod is %i", m_fFreezePeriod);
}
I got this message from the console:
Quote:
] test
m_iNumCT is 1
L 01/07/2014 - 11:00:25: [ORPHEU] Invalid memory structure "m_fFreezePeriod"
|
Now I took a look again CSSDK, I think maybe I know what the problem was..
In InstallGameRules returns CHalfLifeMultiplay address, but m_bFreezePeriod isn't an member in CHalfLifeMultiplay but CGameRules?
So I need to find the address with CGameRules?
Or I still misunderstood something?
__________________