diff --git a/amxmodx/CPlugin.cpp b/amxmodx/CPlugin.cpp index b1aae408..640cdcca 100755 --- a/amxmodx/CPlugin.cpp +++ b/amxmodx/CPlugin.cpp @@ -244,18 +244,12 @@ void CPluginMngr::CPlugin::Finalize() } } -void CPluginMngr::CPlugin::pauseFunction( int id ) { - if (isValid()){ - paused_fun |= (1<isValid()) { + if (plugin && plugin->isValid() && plugin->isPaused() ) + { plugin->unpausePlugin(); return 1; } diff --git a/amxmodx/srvcmd.cpp b/amxmodx/srvcmd.cpp index 79707c84..870ea40b 100755 --- a/amxmodx/srvcmd.cpp +++ b/amxmodx/srvcmd.cpp @@ -97,12 +97,15 @@ void amx_command(){ CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin); - if ( plugin && plugin->isValid() ) + if ( plugin && plugin->isValid() && plugin->isPaused() ) { plugin->unpausePlugin(); print_srvconsole("Unpaused plugin \"%s\"\n",plugin->getName() ); + } else if (!plugin) { + print_srvconsole("Couldn't find plugin matching \"%s\"\n",sPlugin); + } else { + print_srvconsole("Plugin %s can't be unpaused right now.", sPlugin); } - else print_srvconsole("Couldn't find plugin matching \"%s\"\n",sPlugin); } else if (!strcmp(cmd,"cvars"))