pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new count = 0;
SendClientMessage(playerid, COLOR_RED, "<|> Admins Online <|>");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
if(PlayerInfo[i][pAdmin] == 1){
format(string, 256, "Administrator: %s - [Administrator Level: %d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
}else if(PlayerInfo[i][pAdmin] == 2){
format(string, 256, "Administrator: %s - [Administrator Level: %d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
}else if(PlayerInfo[i][pAdmin] == 3){
format(string, 256, "Administrator: %s - [Administrator Level: %d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
}else if(PlayerInfo[i][pAdmin] == 4){
format(string, 256, "Administrator: %s - [Administrator Level: %d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
}else{
format(string, 256, "Administrator: %s - [Administrator Level: %d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
}
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "(INFO) Currently no administrators");
}
SendClientMessage(playerid, COLOR_RED, "<|> Admins Online <|>");
}
return 1;