Raised This Month: $ Target: $400
 0% 

Little Help [#define]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Programmer
Member
Join Date: Sep 2012
Location: Somewhere in the Earth
Old 07-30-2013 , 22:49   Little Help [#define]
Reply With Quote #1

I am Still Beginner That is Learning So Don't Be surprised By my Question ...

I have seen v3x putting all the admin levels but i didn't Know what is the difference between these TWO

Quote:
#define ADMIN_ALL
And

Quote:
#define ADMIN_USER
Thanks.

Last edited by Programmer; 07-30-2013 at 22:53. Reason: I knew the answer
Programmer is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 07-30-2013 , 23:56   Re: Little Help [#define]
Reply With Quote #2

Quote:
Originally Posted by amxconst.inc
#define ADMIN_ALL 0 /* everyone */
#define ADMIN_IMMUNITY (1<<0) /* flag "a" */
#define ADMIN_RESERVATION (1<<1) /* flag "b" */
#define ADMIN_KICK (1<<2) /* flag "c" */
#define ADMIN_BAN (1<<3) /* flag "d" */
#define ADMIN_SLAY (1<<4) /* flag "e" */
#define ADMIN_MAP (1<<5) /* flag "f" */
#define ADMIN_CVAR (1<<6) /* flag "g" */
#define ADMIN_CFG (1<<7) /* flag "h" */
#define ADMIN_CHAT (1<<8) /* flag "i" */
#define ADMIN_VOTE (1<<9) /* flag "j" */
#define ADMIN_PASSWORD (1<<10) /* flag "k" */
#define ADMIN_RCON (1<<11) /* flag "l" */
#define ADMIN_LEVEL_A (1<<12) /* flag "m" */
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
#define ADMIN_LEVEL_C (1<<14) /* flag "o" */
#define ADMIN_LEVEL_D (1<<15) /* flag "p" */
#define ADMIN_LEVEL_E (1<<16) /* flag "q" */
#define ADMIN_LEVEL_F (1<<17) /* flag "r" */
#define ADMIN_LEVEL_G (1<<18) /* flag "s" */
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
#define ADMIN_MENU (1<<20) /* flag "u" */
#define ADMIN_ADMIN (1<<24) /* flag "y" */
#define ADMIN_USER (1<<25) /* flag "z" */
Quote:
Originally Posted by users.ini
; Access flags:
; a - immunity (can't be kicked/baned/slayed/slaped and affected by other commmands)
; b - reservation (can join on reserved slots)
; c - amx_kick command
; d - amx_ban and amx_unban commands
; e - amx_slay and amx_slap commands
; f - amx_map command
; g - amx_cvar command (not all cvars will be available)
; h - amx_cfg command
; i - amx_chat and other chat commands
; j - amx_vote and other vote commands
; k - access to sv_password cvar (by amx_cvar command)
; l - access to amx_rcon command and rcon_password cvar (by amx_cvar command)
; m - custom level A (for additional plugins)
; n - custom level B
; o - custom level C
; p - custom level D
; q - custom level E
; r - custom level F
; s - custom level G
; t - custom level H
; u - menu access
; z - user (no admin)
; Account flags:
; a - disconnect player on invalid password
; b - clan tag
; c - this is steamid/wonid
; d - this is ip
; e - password is not checked (only name/ip/steamid needed)
; k - name or tag is case sensitive. eg: if you set it so the name "Ham"
; is protected and case sensitive (flags "k" only), then anybody
; can use the names "haM", "HAM", "ham", etc, but not "Ham"
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here

Last edited by Shooting King; 07-30-2013 at 23:59.
Shooting King is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-31-2013 , 01:46   Re: Little Help [#define]
Reply With Quote #3

These definitions are used with cmd_access(). ADMIN_ALL means that the function will return true for all users. ADMIN_USER will only return true for non-admins (those with the 'z' flag which is given to non-admins by default).

So, that means it's possible to make commands that can only be used by basic users (non-admins).
__________________
fysiks is offline
Programmer
Member
Join Date: Sep 2012
Location: Somewhere in the Earth
Old 07-31-2013 , 22:28   Re: Little Help [#define]
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
These definitions are used with cmd_access(). ADMIN_ALL means that the function will return true for all users. ADMIN_USER will only return true for non-admins (those with the 'z' flag which is given to non-admins by default).

So, that means it's possible to make commands that can only be used by basic users (non-admins).
Oh Okay I was Idiot But he Didnt specify Things and made them more Clear Any ways Thanks For Your help

[LOCKED]
Programmer is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode