Raised This Month: $ Target: $400
 0% 

register_concomd with multiple access levels


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DPT
Member
Join Date: Jun 2011
Old 02-12-2012 , 20:09   Re: register_concomd with multiple access levels
Reply With Quote #1

fysiks, I have tried:

PHP Code:
register_concmd("amx_test","cmdTest",ADMIN_BAN|ADMIN_LEVEL_H|ADMIN_LEVEL_G
Users with the ADMIN_BAN flag and ADMIN_LEVEL_H were able to access the command. However, users with ADMIN_LEVEL_G were not able to access it. Thats strange.. I tried swapping ADMIN_LEVEL_H with ADMIN_LEVEL_G and still the same results.. users with the ADMIN_LEVEL_G flag were not able to access the command.

To test even further, I tried this:

PHP Code:
register_concmd("amx_test","cmdknifes_only",ADMIN_BAN|ADMIN_LEVEL_G
and guess what, users with ADMIN_LEVEL_H were able to access the command although i removed ADMIN_LEVEL_H this time.. I think there's something wrong with the | between the access levels?

Any other alternative? How can i use get_user_flags to properly check if a user has either ADMIN_BAN OR ADMIN_LEVEL_H OR ADMIN_LEVEL_G flag using an if statement?

Can you please help?

Last edited by DPT; 02-19-2012 at 15:07.
DPT is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-12-2012 , 20:50   Re: register_concomd with multiple access levels
Reply With Quote #2

Some of your experiences sound like you didn't update the .amxx file and restarting before trying again.

Any of the ADMIN_ constants can be put together with the | and it will work if the person has at least one of them.

What were the flags listed in users.ini of those who tried and it didn't work?
__________________
fysiks 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 09:51.


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