/admins question
#1

hello again , i want to ask about something my dialog /admins command
PHP код:
CMD:admins(playeridparams[])
{
    new 
count 1name[126], string[126];
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && PlayerInfo[i][pAdminLevel] != 0)
        {
            
GetPlayerName(inamesizeof(name));
            
format(stringsizeof(string), "Online Adminstrators\n______________\n\n%s%s: %s\n"stringGetPlayerAdminRank(i), name);
            
count ++;
        }
    }
    if(
count 0)
    {
        
ShowPlayerDialog(playerid123DIALOG_STYLE_MSGBOX"{10B51E}Online Adminstrators"string"OK""");
    }
    else 
ShowPlayerDialog(playerid123DIALOG_STYLE_MSGBOX"{10B51E}Online Adminstrators""{FAF5F5}No online admins""OK""");
    return 
1;

I want to appear all current admins while they are offline.
my enum uses :
Код:
PlayerInfo[playerid][pAdmin]
thanks...
Reply
#2

I don't really think this is possible if you're using Y_INI. Possibly you could use some sort of system to store all admin names when you make an admin with your [/makeadmin] or [/setadmin] command.
Reply
#3

Yes, i try to learn foreach for this but its not working , but i think its not impossible ,anyway thnx for reply
Reply
#4

That is possible if you use MySQL
Reply
#5

Create file Admins.ini and write all names
Nick1=Rank
Nick2=Rank
Nick3=Rank
...

then in CMD:admins(playerid, params[])

open that file, read and check nick is online
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)