15.07.2017, 13:05
You are printing the admin variable to the one who used the command instead of detected admins.
Try the following, I have colored the change with red
Try the following, I have colored the change with red
Код:
CMD:admins(playerid,params[]) { new admins[1024], str[64], count; for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++) { if (!IsPlayerConnected(i))continue; if (!PlayerInfo[i][pAdmin])continue; new admin[64]; if(PlayerInfo[i][pAdmin] == 1) { admin = "ADMIN Level[ 1 ]"; } else if(PlayerInfo[i][pAdmin] == 2) { admin = "ADMIN Level[ 2 ]"; } else if(PlayerInfo[i][pAdmin] == 3) { admin = "ADMIN Level[ 3 ]"; } else if(PlayerInfo[i][pAdmin] == 4) { admin = "ADMIN Level[ 4 ]"; } else if(PlayerInfo[i][pAdmin] == 5) { admin = "HEAD ADMIN";} GetPlayerName(i, str, 24); format(str, sizeof(str), "{FFFFFF}Admin Level [ %i ] {FF0000}%s [ID:%d]\r\n", PlayerInfo[i][pAdmin], str, i); strcat(admins, str); count++; } if(!count)return SendClientMessage(playerid,-1,"{FF0000}Няма Онлайн Администратор!"); ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_MSGBOX, "{00FF00}Онлайн админи", admins, "OK", ""); return 1; }