Raised This Month: $ Target: $400
 0% 

Hud Admin Check Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 07-28-2011 , 05:29   Re: Hud Admin Check Problem
Reply With Quote #2

Quote:
Originally Posted by Joker. View Post
Code:
#include <amxmodx> 
#include <amxmisc> 

public plugin_init() { 
    register_plugin("Admin HUD List","1.0","Wa7Ne.1aW") 
    register_clcmd("say /admin","clcmd_admins",-1," - Shows The Online Admins In The Server") 
} 

public clcmd_admins(id) {     
    new adminlist[2048] = "Online Admin^n" 

    new temp[64],adminnames[32],players[32],num,player,i  
    get_players(players,num) 
     
    for(i = 0;i < num;i++) { 
        player = players[i] 
        if(is_user_connected(player) && is_user_admin(player)) 
        {  
            get_user_name(player,adminnames,31) 
            format(temp,63,"【Admin】%s^n",adminnames) 
            add(adminlist,2047,temp) 
        } 
        else if(is_user_connected(player) && get_user_flags(player) & ADMIN_LEVEL_A) 
        {  
            get_user_name(player,adminnames,31) 
            format(temp,63,"【VIP】%s^n",adminnames) 
            add(adminlist,2047,temp) 
        } 
    } 

    if(strfind(adminlist,"-") == -1) { 
        add(adminlist,2047,"") 
    } 

    set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
    show_hudmessage(id,adminlist) 
    return PLUGIN_HANDLED 
}

When I say /admin and check this , have ADMIN_LEVEL_A 's admin will show
【Admin】. It will not be 【VIP】. How to fix that??
Sorry For My Bad English!
Im not really sure but i think
PHP Code:
is_user_admin(id
checks if he have any flags except ADMIN_USER so admin immunity is included too..
but im not sure im noob :]
Dr7sTyLe 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 01:08.


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