mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fixed am51050 - "amxx {pause,unpause" had misleading output
This commit is contained in:
parent
fff603635a
commit
d45c3aeb96
@ -83,11 +83,27 @@ void amx_command()
|
|||||||
|
|
||||||
if (plugin && plugin->isValid())
|
if (plugin && plugin->isValid())
|
||||||
{
|
{
|
||||||
plugin->pausePlugin();
|
if (plugin->isPaused())
|
||||||
print_srvconsole("Paused plugin \"%s\"\n", plugin->getName());
|
{
|
||||||
|
if (plugin->isStopped())
|
||||||
|
{
|
||||||
|
print_srvconsole("Plugin \"%s\" is stopped and may not be paused.\n",plugin->getName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print_srvconsole("Plugin \"%s\" is already paused.\n",plugin->getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
plugin->pausePlugin();
|
||||||
|
print_srvconsole("Paused plugin \"%s\"\n", plugin->getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
|
print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp(cmd, "unpause") && CMD_ARGC() > 2)
|
else if (!strcmp(cmd, "unpause") && CMD_ARGC() > 2)
|
||||||
{
|
{
|
||||||
@ -97,14 +113,21 @@ void amx_command()
|
|||||||
|
|
||||||
if (plugin && plugin->isValid() && plugin->isPaused())
|
if (plugin && plugin->isValid() && plugin->isPaused())
|
||||||
{
|
{
|
||||||
plugin->unpausePlugin();
|
if (plugin->isStopped())
|
||||||
print_srvconsole("Unpaused plugin \"%s\"\n", plugin->getName());
|
{
|
||||||
|
print_srvconsole("Plugin \"%s\" is stopped and may not be unpaused.\n", plugin->getName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
plugin->unpausePlugin();
|
||||||
|
print_srvconsole("Unpaused plugin \"%s\"\n", plugin->getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!plugin)
|
else if (!plugin)
|
||||||
{
|
{
|
||||||
print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
|
print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
|
||||||
} else {
|
} else {
|
||||||
print_srvconsole("Plugin %s can't be unpaused right now.", sPlugin);
|
print_srvconsole("Plugin %s can't be unpaused right now.\n", sPlugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp(cmd, "cvars"))
|
else if (!strcmp(cmd, "cvars"))
|
||||||
|
Loading…
Reference in New Issue
Block a user