Another problem.
[pawn] else if (strcmp(cmd, "admins", true) == 0) {
new Count,i,name[24],string[256];
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) Count++;
if(!Count) return SendClientMessage(playerid, BLUE,"No admins ingame.");
if(Count == 1)
{
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) break;
GetPlayerName(i,name,24);
if(PlayerInfo[Level] == 5)
{
format(string,256,"Present Owners: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
if(PlayerInfo[Level] == 4)
{
format(string,256,"Present Managers: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
if(PlayerInfo[Level] == 3)
{
format(string,256,"Present Administrators: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
if(PlayerInfo[Level] == 2)
{
format(string,256,"Present Moderators: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
return 1;
}
if(Count >= 1)
{
new bool:First = false;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
{
GetPlayerName(i,name,24);
if(!First)
{
if(PlayerInfo[Level] == 5)
{
format(string,256,"Present Owners: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
First = true;
}
else format(string,256,"%s, %s(%d)",string,name,i);
}
return SendClientMessage(playerid, BLUE, string);
}
if(Count >= 1)
{
new bool:First = false;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
{
GetPlayerName(i,name,24);
if(!First)
{
if(PlayerInfo[Level] == 4)
{
format(string,256,"Present Managers: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
First = true;
}
else format(string,256,"%s, %s(%d)",string,name,i);
}
return SendClientMessage(playerid, BLUE, string);
}
if(Count >= 1)
{
new bool:First = false;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
{
GetPlayerName(i,name,24);
if(!First)
{
if(PlayerInfo[Level] == 3)
{
format(string,256,"Present Administrators: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
First = true;
}
else format(string,256,"%s, %s(%d)",string,name,i);
}
return SendClientMessage(playerid, BLUE, string);
}
if(Count >= 1)
{
new bool:First = false;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
{
GetPlayerName(i,name,24);
if(!First)
{
if(PlayerInfo[Level] == 2)
{
format(string,256,"Present Moderators: %s(%d)",name,i);
SendClientMessage(playerid, BLUE, string);
}
First = true;
}
else format(string,256,"%s, %s(%d)",string,name,i);
}
return SendClientMessage(playerid, BLUE, string);
}
GetPlayerName(playerid, name, 32);
printf("%s has used /admins command");
return 1;
}[/pawn]
It says like, I set Dawood's level to 4(manager) and I have 5(Owner) and it says: "Present Owners: Sabreman(1), Dawood(0)"
How to fix it? Dawood's name should appear in Present Managers