Raised This Month: $ Target: $400
 0% 

Add a new non-admin flag to amxx core


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 12-24-2009 , 09:52   Add a new non-admin flag to amxx core
Reply With Quote #1

How can I add for example flag "v" (ADMIN_VIP) to the amxx core without being an admin flag (something like the ADMIN_USER "z" flag) I mean if I'm using is_user_admin(id) to return false ?!
__________________
Let 7he gr0ovE r3Lease y0ur m!nd
addicted2sex is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 12-24-2009 , 17:31   Re: Add a new non-admin flag to amxx core
Reply With Quote #2

PHP Code:

setusernewfrag
id )
{
    
set_user_flags(id, (1<<21) );
}

removeusernewflagid )
{
    
remove_user_flags(id, (1<<21) );
}

is_user_admin2(id)
{
    new 
__flags=get_user_flags(id);
    return (
__flags>&& ( !(__flags&ADMIN_USER) || !(__flags&(1<<21)) ) );

__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-24-2009 , 18:13   Re: Add a new non-admin flag to amxx core
Reply With Quote #3

If a player has flags "z" and any other flags then is_user_admin() returns false. So, if you give them "z" and "t" then they will not be considered an admin by is_user_admin().
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 04:15.


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