SA-MP Forums Archive
/admins question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /admins question (/showthread.php?tid=467852)



/admins question - Ahmed10020 - 05.10.2013

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...


Re: /admins question - EvanA - 05.10.2013

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.


Re: /admins question - Ahmed10020 - 05.10.2013

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


Re: /admins question - MrMou6 - 05.10.2013

That is possible if you use MySQL


Re: /admins question - Jefff - 05.10.2013

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