搜索
查看: 3177|回复: 3

懂orpheu模块的大神进来下!

[复制链接]
发表于 2017-5-5 10:50:32 | 显示全部楼层 |阅读模式 来自 辽宁丹东
#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-6 19:51:10 | 显示全部楼层 来自 广东佛山
你确定是否orpheu模块加载了???
回复

使用道具 举报

 楼主| 发表于 2017-5-7 20:03:48 | 显示全部楼层 来自 辽宁丹东
丶某人的痛才是 发表于 2017-5-6 19:51
你确定是否orpheu模块加载了???

大神 orpheu模块支持1.5麽
回复

使用道具 举报

发表于 2017-5-13 15:13:27 | 显示全部楼层 来自 广东佛山
jiangwe5082 发表于 2017-5-7 20:03
大神 orpheu模块支持1.5麽

不支持,建议1.6吧
回复

使用道具 举报

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

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