17.05.2014, 14:50
Galera to com um problema no meu /admins.
Code:
Quando eu dou /admins sу o Primeiro aparece o Nivel. Exemplo:
Admins Online
Dono Nick (ID) Level
Nick (ID) Level
Nick (ID) Level
Sу no primeiro aparece o nome.
Base do GM: PPC_Trucking
Alguem ajuda?
Code:
pawn Код:
// This command lists all online admins
COMMAND:admins(playerid, params[])
{
SendAdminText(playerid, "/admins", params);
// Setup local variables
new AdminList[500], Name[24];
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Scan through all players
for (new i; i < MAX_PLAYERS; i++)
{
// Check if this player is connected
if (IsPlayerConnected(i))
{
// Get the name of the player
GetPlayerName(i, Name, sizeof(Name));
// Check if this player is an RCON admin
if (IsPlayerAdmin(i))
{
// Add all admin players to the list
format(AdminList, sizeof(AdminList), "%s %s{FAEBD7}%s [ ID %i ] - {00FF7F}(Level: %i)\n",AdminLevelName[APlayerData[i][PlayerLevel]], AdminList, Name, i, APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
// Re-start the for loop (skipping the remaining code for this iteration)
continue;
}
//Check if that player is an admin (using the PlayerLevel)
if (APlayerData[i][PlayerLevel] > 0)
{
// Add all admin players to the list
format(AdminList, sizeof(AdminList), "%s{FAEBD7}%s [ ID %i ] - {00FF7F}(Level: %i)\n", AdminList, Name, i, APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
}
}
}
// Check if there were admin-names added to the list
if (strlen(AdminList) > 0)
ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_MSGBOX, "Administradores Online:", AdminList, "Fechar", "");
else
SendClientMessage(playerid, 0xFF0000FF, "{B0C4DE}Administraзгo offline no momento !"); // No admins are online
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Admins Online
Dono Nick (ID) Level
Nick (ID) Level
Nick (ID) Level
Sу no primeiro aparece o nome.
Base do GM: PPC_Trucking
Alguem ajuda?