From 6ef40779e7f88dde2202fd554ebebc5500f0eea4 Mon Sep 17 00:00:00 2001 From: Vincent Herbet Date: Thu, 5 Mar 2020 14:52:14 +0100 Subject: [PATCH] Add missing is_user_authorized() native (#840) * Add missing is_user_authorized() native It is implemented in core, but missing in amxmodx.inc * Fix typo --- plugins/include/amxmodx.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 2d734802..cfa0faa1 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -921,6 +921,19 @@ native is_user_bot(index); */ native is_user_hltv(index); +/** + * Returns if the client is authorized. + * + * @note This does not throw an error if the provided index is out of the + * 1 to MaxClients range. That means you can safely use this native + * without manually verifying that the index is a valid client index. + * + * @param index Client index + * + * @return 1 if client is authorized, 0 otherwise + */ +native is_user_authorized(index); + /** * Returns if the client is connected. *