|
#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模块也配置了 |
|