Raised This Month: $ Target: $400
 0% 

get_user_flags [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 01-18-2014 , 14:38   get_user_flags [SOLVED]
Reply With Quote #1

I don't get it, what I am doing wrong?

PHP Code:
public sayMenu(id) {
    new 
flags get_user_flags(id)
// if admin (admin_ban) open amxmodmenu
    
if(flags ADMIN)
    {
        
client_cmd(id"amxmodmenu")
        return 
PLUGIN_HANDLED
    
}
// if vip (admin_level_a) open vip menu
    
else if(flags VIP)
    {
        
menuVip(id)
    }
// if not admin/vip (user) show error
    
else
    {
        
ColorChat(idGREY"^3[^4SERVER^3] ^1NOT ADMIN/VIP")
    }
    return 
PLUGIN_HANDLED


Last edited by CHE4TER; 01-20-2014 at 05:23. Reason: SOLVED
CHE4TER is offline
Going Dutch
Member
Join Date: Dec 2013
Old 01-18-2014 , 15:14   Re: get_user_flags
Reply With Quote #2

PHP Code:
public sayMenu(id) { 
    new 
flags get_user_flags(id
// if admin (admin_ban) open amxmodmenu 
    
if(get_user_flags(id) & ADMIN_BAN){
    { 
        
client_cmd(id"amxmodmenu"
        return 
PLUGIN_HANDLED 
    

// if vip (admin_level_a) open vip menu 
    
else if(get_user_flags(id) & ADMIN_LEVEL_A){
    { 
        
menuVip(id
    } 
// if not admin/vip (user) show error 
    
else 
    { 
        
ColorChat(idGREY"^3[^4SERVER^3] ^1NOT ADMIN/VIP"
    } 
    return 
PLUGIN_HANDLED 

Try this
__________________
Learning amxx/pawn and all that good stuff.

Last edited by Going Dutch; 01-18-2014 at 15:14.
Going Dutch is offline
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 01-19-2014 , 09:57   Re: get_user_flags
Reply With Quote #3

Quote:
Originally Posted by Going Dutch View Post
PHP Code:
public sayMenu(id) { 
    new 
flags get_user_flags(id
// if admin (admin_ban) open amxmodmenu 
    
if(get_user_flags(id) & ADMIN_BAN){
    { 
        
client_cmd(id"amxmodmenu"
        return 
PLUGIN_HANDLED 
    

// if vip (admin_level_a) open vip menu 
    
else if(get_user_flags(id) & ADMIN_LEVEL_A){
    { 
        
menuVip(id
    } 
// if not admin/vip (user) show error 
    
else 
    { 
        
ColorChat(idGREY"^3[^4SERVER^3] ^1NOT ADMIN/VIP"
    } 
    return 
PLUGIN_HANDLED 

Try this
No..
CHE4TER is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 01-19-2014 , 17:53   Re: get_user_flags
Reply With Quote #4

code looks ok, you're doing nothing wrong
jimaway is offline
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 01-20-2014 , 05:00   Re: get_user_flags
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
code looks ok, you're doing nothing wrong
I figured out the problem, fail in users.ini
Thanks.

Last edited by CHE4TER; 01-20-2014 at 05:22. Reason: SOLVED
CHE4TER 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 16:46.


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