11.07.2015, 21:48
try this:
Код:
stock MostrarAdmins(playerid) { new bool: aavailable, aonline; new dialog1[1500], arquivo[128], alevel, cargo[64]; for (new J = GetMaxPlayers(), i; i != J; i++) { format(arquivo, sizeof(arquivo), "Usuarios/%s.txt", GetPlayerNameEx(i)); alevel = dini_Int(arquivo, "AdminLevel"); aavailable = alevel > 0 ? true : false; switch(alevel) { case 0: cargo = "Moderador"; case 1: cargo = "Admin 1"; case 2: cargo = "Admin 2"; case 3: cargo = "Admin 3"; case 4: cargo = "Admin 4"; case 5: cargo = "Admin 5"; case 3000: cargo = "Admin 3000"; } if(aavailable) { new adm[25]; aonline = IsPlayerLoggedIn(GetPlayerNameEx(i)); format(adm, sizeof dialog1, "[%s] %s - %s\n", cargo, GetPlayerNameEx(i), aonline ? ("Online") : ("Offline")); strcat(dialog1, adm, sizeof dialog1); ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Administraзгo", dialog1, "Fechar", ""); } } return 1; }