Raised This Month: $ Target: $400
 0% 

Solved Give access to menu, Small problem :)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-13-2017 , 15:34   Re: Give access to menu, Small problem :)
Reply With Quote #7

Why are you checking the flags 3 times?!

PHP Code:
GiveAccess(id)
{
    if (
get_user_flags(id) & ACCESS_ADMIN_LEVEL)
    {
        new 
playerbody;
        
get_user_aiming(idplayerbody);
        
        if (
is_user_connected(player))
        {
            new 
szPlayerName[32];
            
get_user_name(playerszPlayerName32);

            if(
get_user_flags(player) & ACCESS_ADMIN_LEVEL)
            {
                
client_print(idprint_chat"%s %s has got access already."PrefixszPlayerName);
            }
            else
            {      
                new 
flags read_flags("u");
                
set_user_flags(playerflags);
                
                
client_print(playerprint_chat"%s You now have access. Enjoy!"Prefix);
                
client_print(idprint_chat"%s %s has access now."PrefixszPlayerName);
            }
        }
    }

If this doesn't work, the error is somewhere else in the plugin, so post the full code.
__________________

Last edited by OciXCrom; 02-13-2017 at 15:35.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
 



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 21:01.


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