View Single Post
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 01-03-2020 , 11:21   [H3LP] g_pGameRules
Reply With Quote #1

Hello. I'm trying to retrieve g_pGameRules using gamerules but it always returns 0. Game is TFC. Any ideas ? The signature is correct, the file InstallGameRules_tfc is well parsed.
Note: I'm using Debian.

PHP Code:
#include <amxmodx>
#include <orpheu>
#include <orpheu_stocks>

new OrpheuHookg_hGameRules,
new 
g_pGameRules;

public 
plugin_precache()
{
    
g_hGameRules OrpheuRegisterHook(OrpheuGetFunction("InstallGameRules_tfc"), "OnInstallGameRules"OrpheuHookPost);
}

public 
OnInstallGameRules()
{
    
g_pGameRules OrpheuGetReturn();

    
server_print("g_pGameRules -> %d"g_pGameRules); // always prints 0

    
OrpheuUnregisterHook(g_hGameRules);


Last edited by DarthMan; 01-03-2020 at 11:23.
DarthMan is offline