20.03.2015, 12:00
Should work.
Code:
CMD:admins(playerid, params[]) { new count = 0, string19[256]; SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|"); for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { if(pInfo[i][Adminlevel] == 1) { format(string19, sizeof(string19), "Trial Moderator : %s (%i)",GetName(i), i); SendClientMessage(playerid, COLOR_WHITE, string19); count++; } if(pInfo[i][Adminlevel] == 2) { format(string19, sizeof(string19), "Moderator : %s (%i)",GetName(i), i); SendClientMessage(playerid, COLOR_WHITE, string19); count++; } if(pInfo[i][Adminlevel] == 3) { format(string19, sizeof(string19), "Admin : %s (%i)",GetName(i), i); SendClientMessage(playerid, COLOR_WHITE, string19); count++; } if(pInfo[i][Adminlevel] == 4) { format(string19, sizeof(string19), "Server Manager : %s (%i)",GetName(i), i); SendClientMessage(playerid, COLOR_WHITE, string19); count++; } if(pInfo[i][Adminlevel] == 5) { format(string19, sizeof(string19), "Server Owner : %s (%i)",GetName(i), i); SendClientMessage(playerid, COLOR_WHITE, string19); count++; } } } if(count == 0) SendClientMessage(playerid, COLOR_WHITE, "- No Admins Online at this Time!"); SendClientMessage(playerid, COLOR_GREEN, "|==============================|"); SendClientMessage(playerid, COLOR_GREEN, ""); return 1; } stock GetName(playerid) { new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); return pname; }