Raised This Month: $ Target: $400
 0% 

Problem of Showing admins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
edward0810
Member
Join Date: Mar 2009
Location: H.K.
Old 07-31-2009 , 04:58   Problem of Showing admins
Reply With Quote #1

So this time i have a plugin which has no compiling problem but it doesn't works fine. Anyway, plugin first:
Code:
#include <amxmodx> #include <amxmisc> new ranr new rang new ranb public plugin_init() {  register_plugin("Admin HUD List","1.0","Don't know")  register_clcmd("say /admin","clcmd_admins",-1," - Shows The Online Admins In The Server")  ranr = random_num(0,255)  rang = random_num(0,255)  ranb = random_num(0,255) } public clcmd_admins(id) {  new adminlist[2048] = "Admins Currently Online^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) && (get_user_flags(player) & ADMIN_LEVEL_A))   {    get_user_name(player,adminnames,31)    format(temp,63,"【LV3 ADMIN】%s^n",adminnames)    add(adminlist,2047,temp)   }   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) && (get_user_flags(player) & ADMIN_LEVEL_B))    {     get_user_name(player,adminnames,31)     format(temp,63,"【LV2 ADMIN】%s^n",adminnames)     add(adminlist,2047,temp)    }    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) && (get_user_flags(player) & ADMIN_LEVEL_C))     {      get_user_name(player,adminnames,31)      format(temp,63,"【LV1 ADMIN】%s^n",adminnames)      add(adminlist,2047,temp)     }     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) && (get_user_flags(player) & ADMIN_LEVEL_D))      {       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(ranr, rang, ranb, -1.0, 0.0, 2, 2.0, 6.0, 0.1, 0.1, 2)     show_hudmessage(id,adminlist)     return PLUGIN_HANDLED    }   }  }  return PLUGIN_HANDLED }



The problem is:
The higher lv admins' names have also been shown in the lower lv column. Let's say that abc is lv3 and the only admin in the server.Then when i say /admin, the hud message is like this:
Quote:
【LV3 ADMIN】
abc
【LV2 ADMIN】
abc
【LV1 ADMIN】
abc
【VIP】
abc
Who can fix this!?
At last sorry for my bad english.

Last edited by edward0810; 07-31-2009 at 05:02.
edward0810 is offline
 


Thread Tools
Display Modes

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 18:29.


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