Fixed ADMIN_ALL bug

This commit is contained in:
David Anderson 2004-10-03 06:23:25 +00:00
parent 3700b8b39f
commit ef90960121

View File

@ -11,17 +11,22 @@
#endif
#define _amxmisc_included
stock is_user_admin(id)
{
return ( get_user_flags(id)>0 && !(get_user_flags(id)&ADMIN_USER) )
}
stock cmd_access(id,level,cid,num) {
new has_access = 0
if ( id==(is_dedicated_server()?0:1) ) {
has_access = 1
}
else if ( level==ADMIN_ADMIN ) {
} else if ( level==ADMIN_ADMIN ) {
if ( is_user_admin(id) )
has_access = 1
}
else if ( get_user_flags(id) & level ) {
} else if ( get_user_flags(id) & level ) {
has_access = 1
} else if (level == ADMIN_ALL) {
has_access = 1
}
if ( has_access==0 ) {
@ -44,10 +49,6 @@ stock access(id,level) {
return (get_user_flags(id) & level)
}
stock is_user_admin(id) {
return ( get_user_flags(id)>0 && !(get_user_flags(id)&ADMIN_USER) )
}
/* Flags:
* 1 - obey immunity
* 2 - allow yourself