Raised This Month: $ Target: $400
 0% 

Spy admin error?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-17-2011 , 18:55   Re: Spy admin error?
Reply With Quote #2

1.
Code:
if(containi(oldflags[id], "a") || containi(oldflags[id], "c") || containi(oldflags[id], "d") || containi(oldflags[id], "j"))
Won't work because oldflags[id] is not a string. I'm amazed it compiles.

When restoring admin access do:
Code:
set_user_flags(id, -1) // Remove all flags.
set_user_flags(id, oldflags[id])
And similarly when removing admin access flags.
2. users.ini is not affected.
3. Yes, it will affect the return value of is_user_admin(). See the function:

PHP Code:
stock is_user_admin(id)
{
    new 
__flags=get_user_flags(id);
    return (
__flags>&& !(__flags&ADMIN_USER));

__________________

Last edited by fysiks; 03-17-2011 at 19:05.
fysiks is offline
 



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 14:39.


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