30.06.2016, 13:12
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", cmdtext, true, 10) == 0)
{
new admins[1024];
new ba=0;
new ta[MAX_PLAYER_NAME+70];
new an[MAX_PLAYER_NAME];
for(new i = 0, j = GetPlayerPoolSize();i < 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(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Admins online", admins, "OK", "");
}
return 1;
}