mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-05-05 03:19:33 +03:00
Add enum of args for register_plugin native
This commit is contained in:
parent
865e020d78
commit
793a122af9
@ -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 */
|
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);
|
CPluginMngr::CPlugin* a = g_plugins.findPluginFast(amx);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
const char *title = get_amxstring(amx, params[1], 0, i);
|
const char *title = get_amxstring(amx, params[arg_title], arg_title - 1, i);
|
||||||
const char *vers = get_amxstring(amx, params[2], 1, i);
|
const char *vers = get_amxstring(amx, params[arg_version], arg_version - 1, i);
|
||||||
const char *author = get_amxstring(amx, params[3], 2, i);
|
const char *author = get_amxstring(amx, params[arg_author], arg_author - 1, i);
|
||||||
const char *url = get_amxstring(amx, params[4], 3, i);
|
const char *url = get_amxstring(amx, params[arg_url], arg_url - 1, i);
|
||||||
const char *description = get_amxstring(amx, params[5], 4, i);
|
const char *description = get_amxstring(amx, params[arg_description], arg_description - 1, i);
|
||||||
|
|
||||||
#if defined BINLOG_ENABLED
|
#if defined BINLOG_ENABLED
|
||||||
g_BinLog.WriteOp(BinLog_Registered, a->getId(), title, vers);
|
g_BinLog.WriteOp(BinLog_Registered, a->getId(), title, vers);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user