Getting an ID only with more than three arguments

This commit is contained in:
KaidoRen 2019-05-14 17:06:59 +05:00
parent 9e31230368
commit 5f66e7f190

View File

@ -65,14 +65,13 @@ void amx_command()
}
else if (!strcmp(cmd, "plugin"))
{
auto id = atoi(CMD_ARGV(2));
if (CMD_ARGC() < 3)
{
print_srvconsole("Usage: amxx plugin < plugin_id >\nFor a list of plugins, use the \"amxx plugins\" command\n");
}
else
{
auto id = atoi(CMD_ARGV(2));
auto plugin = g_plugins.findPlugin(id);
if (plugin && plugin->isValid())