Quote:
Originally Posted by jimaway
public server_changelevel ( map[] )
|
There's no return for that forward. It's called afterwards.
You can't actually hook CGameRules::ChangeLevel, use GoToIntermission instead. The advantage of this is that it will not be called when a server admin changes the map via
amxmodmenu or
amx_map:
Code:
#include <amxmodx>
#include <orpheu>
#include <orpheu_stocks>
new g_pGameRules;
public plugin_precache()
{
OrpheuRegisterHook( OrpheuGetFunction( "InstallGameRules" ), "On_InstallGameRules", OrpheuHookPost );
}
public plugin_init()
{
OrpheuRegisterHookFromObject( g_pGameRules, "GoToIntermission", "CGameRules", "On_GoToIntermission" );
}
public On_InstallGameRules()
{
g_pGameRules = OrpheuGetReturn();
}
public OrpheuHookReturn: On_GoToIntermission()
{
/* Change level / set short task to change level here / change amx_nextmap */
}
__________________