Fixed ADMIN_ALL bug
This commit is contained in:
parent
3700b8b39f
commit
ef90960121
@ -11,16 +11,21 @@
|
||||
#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
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user