Raised This Month: $ Target: $400
 0% 

Hud Admin Check Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-29-2011 , 08:09   Re: Hud Admin Check Problem
Reply With Quote #1

I am pretty sure the bug is not in the part I gave you but in the whole code you should now show.
SnoW is offline
Send a message via MSN to SnoW
Joker.
Member
Join Date: Mar 2011
Old 07-29-2011 , 12:43   Re: Hud Admin Check Problem
Reply With Quote #2

Quote:
Originally Posted by SnoW View Post
I am pretty sure the bug is not in the part I gave you but in the whole code you should now show.

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(id) && is_user_admin(id) )
        {  
            get_user_name(player,adminnames,31) 
            format(temp,63,"%s%s^n", get_user_flags(id) & ADMIN_LEVEL_A  ? "【Admin】" : "【VIP】", 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 
}

Last edited by Joker.; 07-29-2011 at 12:44. Reason: change something
Joker. 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 01:08.


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