diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 7b21d36e..7e03d67c 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -1398,14 +1398,16 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */ static cell AMX_NATIVE_CALL register_plugin(AMX *amx, cell *params) /* 5 param */ { + enum { arg_count, arg_title, arg_version, arg_author, arg_url, arg_description }; + CPluginMngr::CPlugin* a = g_plugins.findPluginFast(amx); int i; - const char *title = get_amxstring(amx, params[1], 0, i); - const char *vers = get_amxstring(amx, params[2], 1, i); - const char *author = get_amxstring(amx, params[3], 2, i); - const char *url = get_amxstring(amx, params[4], 3, i); - const char *description = get_amxstring(amx, params[5], 4, i); + const char *title = get_amxstring(amx, params[arg_title], arg_title - 1, i); + const char *vers = get_amxstring(amx, params[arg_version], arg_version - 1, i); + const char *author = get_amxstring(amx, params[arg_author], arg_author - 1, i); + const char *url = get_amxstring(amx, params[arg_url], arg_url - 1, i); + const char *description = get_amxstring(amx, params[arg_description], arg_description - 1, i); #if defined BINLOG_ENABLED g_BinLog.WriteOp(BinLog_Registered, a->getId(), title, vers);