01.04.2012, 16:41
hello guys i got this /admins command :
when more than 86 characters of admins like player1[rank], player2[rank], player3[ra (this part doesn't show anymore}
so what i need is to make when more than 2admins online to write the others on another line
please it would be awesome if you help
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 0)
{
new bool:First2 = false;
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][Level] > 0)
Count++;
if(Count == 0)
return SendClientMessage(playerid,red, "No admins online.");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][Level] > 0)
{
if(AccInfo[i][Level] > 0)
{
switch(AccInfo[i][Level])
{
case 1: AdmRank = "Tester";
case 2: AdmRank = "Co-Mod";
case 3: AdmRank = "Mod";
case 4: AdmRank = "Admin";
case 5: AdmRank = "{05BDFA}Leader{FF0000}";
case 6: AdmRank = "{05BDFA}Manager{FF0000}";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "{05BDFA}Online admins:{FF0000} %s [%s]", PlayerName2(i),AdmRank);
First2 = true;
}
else format(string,sizeof(string),"%s, %s [%s]",string, PlayerName2(i),AdmRank);
}
return SendClientMessage(playerid,red,string);
}
else return ErrorMessages(playerid, 1);
}
so what i need is to make when more than 2admins online to write the others on another line
please it would be awesome if you help
![Smiley](images/smilies/smile.png)