Skip to content

Commit 4b417db

Browse files
szGabuArkshine
andauthored
Add missing is_user_authorized() native (#840) (#1136)
* Add missing is_user_authorized() native It is implemented in core, but missing in amxmodx.inc * Fix typo Co-authored-by: Vincent Herbet <[email protected]>
1 parent 912ac27 commit 4b417db

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

plugins/include/amxmodx.inc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,19 @@ native is_user_bot(index);
923923
*/
924924
native is_user_hltv(index);
925925

926+
/**
927+
* Returns if the client is authorized.
928+
*
929+
* @note This does not throw an error if the provided index is out of the
930+
* 1 to MaxClients range. That means you can safely use this native
931+
* without manually verifying that the index is a valid client index.
932+
*
933+
* @param index Client index
934+
*
935+
* @return 1 if client is authorized, 0 otherwise
936+
*/
937+
native is_user_authorized(index);
938+
926939
/**
927940
* Returns if the client is connected.
928941
*

0 commit comments

Comments
 (0)