diff --git a/amxmodx/CPlugin.h b/amxmodx/CPlugin.h index 77074c95..951d7a17 100755 --- a/amxmodx/CPlugin.h +++ b/amxmodx/CPlugin.h @@ -98,6 +98,7 @@ public: inline void setError(const char* n) { errorMsg.assign(n); } inline bool isValid() const { return (status >= ps_paused); } inline bool isPaused() const { return ((status == ps_paused) || (status == ps_stopped)); } + inline bool isStopped() const { return (status == ps_stopped); } inline bool isExecutable(int id) const { return (isValid() && !isPaused()); } void Finalize(); diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index fabc75b4..4dee3cc2 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -2453,7 +2453,7 @@ static cell AMX_NATIVE_CALL unpause(AMX *amx, cell *params) /* 3 param */ else plugin = g_plugins.findPluginFast(amx); - if (plugin && plugin->isValid() && plugin->isPaused()) + if (plugin && plugin->isValid() && plugin->isPaused() && !plugin->isStopped()) { plugin->unpausePlugin(); return 1;