Help /admins command unknown command
#9

Mates you're confusing him, you're starting your loop from id -1 which will crash it and will say unknow command leme fix it for you sir
PHP код:
if (strcmp("/admins"cmdtexttrue10) == 0)
    {
        new 
admins[1024];
        new 
ba=0;
        new 
ta[MAX_PLAYER_NAME+70];
        new 
an[MAX_PLAYER_NAME];
        for(new 
0GetPlayerPoolSize();j;i++)
        {
        if(
IsPlayerConnected(i))
        {
        if(
PlayerInfo[i][pAdmin]!=0)
        {
        
ba++;
        
GetPlayerName(i,an,sizeof(an));
        
format(ta,sizeof(ta),"{FFFFFF}Admin %s Level %d\n",an,PlayerInfo[i][pAdmin]);
        
strins(ta,admins,sizeof(admins));
        }
        }
        }
        if(
ba==0)
        {
        
SendClientMessage(playerid,-1,"{FF0000}No Admins Online!");
        }
        else
        {
        
ShowPlayerDialog(playeridDIALOG_ADMINSDIALOG_STYLE_MSGBOX"Admins online"admins"OK""");
        }
        return 
1;

Reply


Messages In This Thread
Help /admins command unknown command - by alekschowee - 30.06.2016, 12:28
Re: Help /admins command unknown command - by Konstantinos - 30.06.2016, 12:33
Re: Help /admins command unknown command - by CodeStyle175 - 30.06.2016, 12:38
Re: Help /admins command unknown command - by alekschowee - 30.06.2016, 12:38
Re: Help /admins command unknown command - by Owen007 - 30.06.2016, 12:44
Re: Help /admins command unknown command - by alekschowee - 30.06.2016, 12:48
Re: Help /admins command unknown command - by alekschowee - 30.06.2016, 12:50
Re: Help /admins command unknown command - by alekschowee - 30.06.2016, 13:09
Re: Help /admins command unknown command - by jlalt - 30.06.2016, 13:12
Re: Help /admins command unknown command - by alekschowee - 30.06.2016, 13:33

Forum Jump:


Users browsing this thread: 4 Guest(s)