搜索
查看: 3933|回复: 1

懂ORPHEU模块的大神请进来下

[复制链接]
发表于 2017-5-5 10:55:38 | 显示全部楼层 |阅读模式 来自 中国–辽宁–丹东
#include <amxmodx>
#include <orpheu>
#include <orpheu_memory>

#define PLUGIN  "Fix RoundTimer"
#define AUTHOR  "Rirre/Arkshine"
#define VERSION "1.1"

enum GameRulesMembers
{
        m_iRoundTimeSecs,
        m_flRoundCount
};

new const GameRulesMI[ GameRulesMembers ][] =
{
        "m_iRoundTimeSecs",
        "m_flRoundCount"
};

new g_pGameRules;
new g_c4timer, mp_c4timer;

#define set_mp_pdata(%1,%2)  ( OrpheuMemorySetAtAddress( g_pGameRules, GameRulesMI[ %1 ], 1, %2 ) )
#define get_mp_pdata(%1)     ( OrpheuMemoryGetAtAddress( g_pGameRules, GameRulesMI[ %1 ] ) )

public plugin_precache() OrpheuRegisterHook( OrpheuGetFunction( "InstallGameRules" ), "OnInstallGameRules", OrpheuHookPost );

public OnInstallGameRules() g_pGameRules = OrpheuGetReturn();

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR);
        register_logevent("PlantedBomb", 3, "2=Planted_The_Bomb");
        
        mp_c4timer = get_cvar_pointer("mp_c4timer");
}

public plugin_cfg() g_c4timer = get_pcvar_num(mp_c4timer);

public PlantedBomb() setRoundTime( g_c4timer );

setRoundTime( const newTime )
{
        set_mp_pdata( m_iRoundTimeSecs, newTime );
        set_mp_pdata( m_flRoundCount, get_gametime() );
        
        static msgIndexRoundTime;
        
        if( msgIndexRoundTime || ( msgIndexRoundTime = get_user_msgid( "RoundTime" ) ) )
        {
                message_begin( MSG_ALL, msgIndexRoundTime );
                write_short( newTime );
                message_end();
        }
}

L 05/05/2017 - 10:31:12: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20170505.log")
L 05/05/2017 - 10:31:12: [ORPHEU] Function "InstallGameRules" not found
L 05/05/2017 - 10:31:12: [AMXX] Displaying debug trace (plugin "Fix_RoundTimer.amxx")
L 05/05/2017 - 10:31:12: [AMXX] Run time error 10: native error (native "OrpheuGetFunction")
L 05/05/2017 - 10:31:12: [AMXX]    [0] Fix_RoundTimer.sma::plugin_precache (line 27)

哪地方出错了啊 哪位大神能帮帮我 研究好长时间了 也没找到问题
ORPHEU模块也配置了
发表于 2017-5-5 12:14:19 | 显示全部楼层 来自 中国–广东–深圳
[ORPHEU] Function "InstallGameRules" not found     
[ORPHEU] 功能“安装游戏规则”没有找到

ORPHEU模块未启动,或者 游戏版本  不支持  ORPHEU模块。
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表