Raised This Month: $32 Target: $400
 8% 

[REQ] Small ADMIN_LEVEL help


Post New Thread Reply   
 
Thread Tools Display Modes
Versus1994
Senior Member
Join Date: Jan 2013
Old 01-22-2018 , 20:43   Re: [REQ] Small ADMIN_LEVEL help
Reply With Quote #11

Quote:
Originally Posted by Bugsy View Post
You need to separate the "/prefix" check and permission check.
PHP Code:
public HookSay(id

    
read_argsg_typed charsmaxg_typed ) ) 
    
    
remove_quotes(g_typed
    
    
trimg_typed 
    
server_print"[%s]" g_typed) ;
    if ( !
g_typed] ) 
        return 
PLUGIN_HANDLED;
    
    if ( 
equalg_typed "/prefix" ) )
    {
        if ( 
get_user_flagsid ) & ADMIN_BAN 
        { 
            
client_print(idprint_chat"%L"LANG_SERVERg_toggle[id] ? "PREFIX_OFF" "PREFIX_ON" in_prefix
            
g_toggle[id] = !g_toggle[id];
        } 
        else 
        { 
            
client_printid print_chat "You do not have access." );  
        }  
    }
    
    return 
PLUGIN_HANDLED;

Thank you!
There is warnings but everything works fine!
Versus1994 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-22-2018 , 21:53   Re: [REQ] Small ADMIN_LEVEL help
Reply With Quote #12

The code I posted has no warnings, it must be other parts of your code.
__________________
Bugsy is offline
Reply



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 02:25.


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