if(strcmp(cmd, "/admins", true) == 0) {
new online;
new lColour;
for (new I = 0; I < MAX_PLAYERS; I++) {
// If player i is not connected, try next player.
if (!IsPlayerConnected(I)) continue;
// If player is not a mod or above, try next player.
if (Mod[I] != 1) continue;
// Player has atleast mod-rights, get moderator's name.
GetPlayerName(I, sendername, sizeof(sendername));
// Let's see what rights he has.
if (ModPlus[I] != 1) {
// If is not a mod+, then it is a moderator, format text and store colour of message.
format(string, sizeof(string), "%s - Moderator", sendername);
lColour = COLOR_WHITE;
}
else if (Admin[I] != 1) {
// Player has mod+ rights, but is not an admin, format text and store colour of message...
format(string, sizeof(string), "%s - Mod+", sendername);
lColour = COLOR_WHITE;
}
else if (Beckzy[I] != 1) {
format(string, sizeof(string), "%s - Mod+", sendername);
lColour = COLOR_YELLOW;
}
else {
format(string, sizeof(string), "%s - Key Admin", sendername);
lColour = 55; // COLOR_MEDIAMBLUE;
}
online++;
if (online == 1)
SendClientMessage(playerid, COLOR_WHITE, "Current Admins Online");
SendClientMessage(playerid, lColour, string);
}
if (online == 0) {
SendClientMessage(playerid, COLOR_RED, "There are currently no admins online!");
}
return 1;
}