diff --git a/amxmodx/CForward.cpp b/amxmodx/CForward.cpp index faa54967..7b88394c 100755 --- a/amxmodx/CForward.cpp +++ b/amxmodx/CForward.cpp @@ -454,6 +454,11 @@ const char *CForwardMngr::getFuncName(int id) const return (id & 1) ? m_SPForwards[id >> 1]->getFuncName() : m_Forwards[id >> 1]->getFuncName(); } +int CForwardMngr::getFuncsNum(int id) const +{ + return (id & 1) ? m_SPForwards[id >> 1]->getFuncsNum() : m_Forwards[id >> 1]->getFuncsNum(); +} + int CForwardMngr::getParamsNum(int id) const { return (id & 1) ? m_SPForwards[id >> 1]->getParamsNum() : m_Forwards[id >> 1]->getParamsNum(); diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index 3c0cef2e..0551d5f1 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -1216,8 +1216,11 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...) at_logged // Server print to console ( only in multiplayer games ). */ + cell retVal = 0; + // execute logevents and plugin_log forward - if (g_logevents.logEventsExist()) + if (g_logevents.logEventsExist() + || g_forwards.getFuncsNum(FF_PluginLog)) { va_list logArgPtr; va_start(logArgPtr, szFmt); @@ -1229,9 +1232,9 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...) { g_logevents.executeLogEvents(); } - } - cell retVal = executeForwards(FF_PluginLog); + retVal = executeForwards(FF_PluginLog); + } if (retVal) {