Raised This Month: $ Target: $400
 0% 

VIP Player Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 07-05-2022 , 18:52   Re: VIP Player Model
Reply With Quote #1

Well, I wouldn't need it anymore because I discarded this plugin, but if I want to answer, I can help to improve my learning in the future. What I asked was how to add a flag, for example "t" that is ADMIN_LEVEL_H in this plugin so that only administrators or those who have access to this flag can access the models menu
MeliMeli is offline
Fixsek Kot
Member
Join Date: Feb 2022
Old 07-06-2022 , 06:40   Re: VIP Player Model
Reply With Quote #2

Oh okay now I get it, it is simple:
PHP Code:
public menu(id)
{
    if(
get_user_flags(id) & ADMIN_BAN || get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
//The menu
    
}
    else
    {
        
client_print(idprint_chat"This menu is only for admins and people with flag T!")
    }

Yeah I prefere checking ADMIN_BAN than something like is_user_admin, because this condition looks for any kind of flag, even ADMIN_LEVEL_H, and we want to find an administrator, those always have ADMIN_BAN flag.
Hope that helps

Last edited by Fixsek Kot; 07-06-2022 at 06:44.
Fixsek Kot 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 21:23.


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