AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Orpheu] Memory (https://forums.alliedmods.net/showthread.php?t=232861)

11922911 01-05-2014 21:36

[Orpheu] Memory
 
I want to change the value for an variable, it's named m_bFreezePeriod in CSSDK.

I don't really know how to do it, but I've took a look into infinite round plugin by arkshine, Seems I need a file for its memory offset in CGameRules class, but I'm not sure the offset for m_bFreezePeriod.

How could I find it?

ConnorMcLeod 01-06-2014 00:53

Re: [Orpheu] Memory
 
1 Attachment(s)
Name is m_fFreezePeriod and type is BOOL (int), not bool.

Try with this file.

cstrike\addons\amxmodx\configs\orpheu\memory\CGameRules_pdatas

11922911 01-06-2014 22:05

Re: [Orpheu] Memory
 
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?

ConnorMcLeod 01-07-2014 00:55

Re: [Orpheu] Memory
 
Dunno, have you removed the file that is coming with infinite round ? (i think there are not all offsets in it)

And is there a file named 'BOOL' in 'cstrike\addons\amxmodx\configs\orpheu\types\ long\aliases\' ?

with content :

Code:

[
        "BOOL"
]


11922911 01-07-2014 01:04

Re: [Orpheu] Memory
 
I didn't put any file coming with infinite round, I just use the file that you gave.
And I don't see a file named 'BOOL' in configs\orpheu\types\long\aliases.

ConnorMcLeod 01-07-2014 11:57

Re: [Orpheu] Memory
 
Create it then.

11922911 01-07-2014 21:28

Re: [Orpheu] Memory
 
Quote:

Originally Posted by ConnorMcLeod (Post 2082538)
Create it then.

It's work now.
Thank you.:bee:


All times are GMT -4. The time now is 10:05.

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