diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 74de9e19..71b98599 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -534,6 +534,11 @@ static cell AMX_NATIVE_CALL is_user_alive(AMX *amx, cell *params) /* 1 param */ return ((pPlayer->ingame && pPlayer->IsAlive()) ? 1 : 0); } +static cell AMX_NATIVE_CALL get_amxx_verstring(AMX *amx, cell *params) /* 2 params */ +{ + return set_amxstring(amx, params[1], AMX_VERSION, params[2]); +} + static cell AMX_NATIVE_CALL get_user_frags(AMX *amx, cell *params) /* 1 param */ { int index = params[1]; @@ -4106,6 +4111,7 @@ AMX_NATIVE_INFO amxmodx_Natives[] = {"get_systime", get_systime}, {"get_time", get_time}, {"get_timeleft", get_timeleft}, + {"get_amxx_verstring", get_amxx_verstring}, {"get_user_aiming", get_user_aiming}, {"get_user_ammo", get_user_ammo}, {"get_user_armor", get_user_armor}, diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 6cf56625..40d9e792 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -194,6 +194,9 @@ native is_linux_server(); /* Returns 1 or 0. */ native is_jit_enabled(); +/* Returns AMXX's version string of the current gameserver */ +native get_amxx_verstring(buffer[], length); + /* If player is not attacked function returns 0, in other * case returns index of attacking player. On second and third * parameter you may get info about weapon and body hit place. */