09.01.2014, 10:33
tente
pawn Код:
command(administradores,playerid, params[])
{
new string[1000], fstring[1000], xptc = 0, Name[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (IsPlayerAdmin(i))
{
GetPlayerName(i, Name, sizeof(Name));
format(fstring, 1000, "{FFFFFF}%s: %s (id: %i), Admin-Level: %i\n", AdminLevelName[APlayerData[i][PlayerLevel], Name, i, APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
strcat(string, fstring, 1000);
}
if (APlayerData[i][PlayerLevel] != 0)
{
GetPlayerName(i, Name, sizeof(Name));
format(fstring, 3000, "{FFFFFF}%s (%i) й um %s [level %i]\n", Name, i, AdminLevelName[APlayerData[i][PlayerLevel]], APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
strcat(string, fstring, 1000);
}
xptc++;
}
}
if(xptc == 0) return GameTextForPlayer(playerid, "~r~SEM ADMINISTRADORES~n~~w~ONLINE", 4000, 5);
else ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores disponiveis:", string, "OK", "");
return 1;
}