AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Add a new non-admin flag to amxx core (https://forums.alliedmods.net/showthread.php?t=113192)

addicted2sex 12-24-2009 09:52

Add a new non-admin flag to amxx core
 
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 ?!

AntiBots 12-24-2009 17:31

Re: Add a new non-admin flag to amxx core
 
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)) ) );



fysiks 12-24-2009 18:13

Re: Add a new non-admin flag to amxx core
 
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().


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

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