Raised This Month: $ Target: $400
 0% 

cmd_access


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 04-23-2013 , 14:56   cmd_access
Reply With Quote #1

PHP Code:
public plugin_init() 

    
register_concmd("amx_info""ShowInfo"ADMIN_ALL"Shows player's IP and STEAMID.")    
}

public 
ShowInfo(id level cid
{
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

I wan't that amx_info would be accessible for everybody. If i do like in the code then admins can't use it, it show's "You have no access for this commands".
GhostMan is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 04-23-2013 , 15:06   Re: cmd_access
Reply With Quote #2

EDIT:

Fail answer, for all player replace the ADMIN_ALL to _ :

PHP Code:
   register_concmd("amx_info""ShowInfo"ADMIN_ALL"Shows player's IP and STEAMID."
to

PHP Code:
   register_concmd("amx_info""ShowInfo"_"Shows player's IP and STEAMID."



ADMIN_ALL shoud be all flags (including "a")

Change it to ADMIN_****

amxconst.inc

Code:
#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" */
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 04-23-2013 at 15:08.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-23-2013 , 23:12   Re: cmd_access
Reply With Quote #3

Changing the flag in the plugin won't do anything if the command is already in cmdaccess.ini. Change it there. To get ADMIN_ALL, you might be able to do: "".
__________________
fysiks is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 04-24-2013 , 07:27   Re: cmd_access
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
Changing the flag in the plugin won't do anything if the command is already in cmdaccess.ini. Change it there. To get ADMIN_ALL, you might be able to do: "".
I think this is wrong: The AMXX re-store the new flag in cmdaccess.ini

__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-24-2013 , 21:26   Re: cmd_access
Reply With Quote #5

Quote:
Originally Posted by ^SmileY View Post
I think this is wrong: The AMXX re-store the new flag in cmdaccess.ini

If that was true then cmdaccess.ini would be pointless.
__________________
fysiks is offline
zi443r
Senior Member
Join Date: Mar 2009
Location: Braila,Romania
Old 04-24-2013 , 08:00   Re: cmd_access
Reply With Quote #6

no, remains the same in cmdaccess.ini until you delete cmadaccess.ini or that part from it
zi443r 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 10:49.


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