Create command /admins in dialog
#4

Quote:
Originally Posted by Shinja
Посмотреть сообщение
You are checking Admin[playerid], and you must check if the player connected also
also, you do (Admin[i] >= 0), also non admins will be formatted here is the right code
increase string size a little bit more
PHP код:
CMD:admins(playerid){
    new 
string[300];
    new 
fstring[64];
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
Admin[i] > && IsPlayerConnected(i))
        {
            
GetPlayerName(i,adminnamesizeof(adminname));
            
format(fstringsizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n"adminnamei,Admin[i]);
            
strcat(stringfstringsizeof(string));
        }
    }
    
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Admins",string,"OK","");
    return 
1;

I put the code but when you try it on the server I get: unknown command
Reply


Messages In This Thread
Create command /admins in dialog - by Z4firo - 14.08.2016, 20:05
Re: Create command /admins in dialog - by Shinja - 14.08.2016, 20:12
Re: Create command /admins in dialog - by Fantje - 14.08.2016, 20:14
Re: Create command /admins in dialog - by Z4firo - 14.08.2016, 21:37
Re: Create command /admins in dialog - by Shinja - 14.08.2016, 22:10
Re: Create command /admins in dialog - by DarkLouis - 14.08.2016, 23:26
Re: Create command /admins in dialog - by WhiteGhost - 14.08.2016, 23:38
Re: Create command /admins in dialog - by Shinja - 15.08.2016, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)