CMD:admins(playerid, params[])
{
// Setup local variables
new AdminList[2000], Name[24], Adm;
// 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 that player is an admin (using the PlayerLevel)
if (APlayerData[i][PlayerLevel] >= 1)
{
// Add all admin players to the list
Adm++;
format(AdminList, sizeof(AdminList), "%s{FFFFFF} {ff0000}%s {FFFFFF} %s (ID:%i){00FF00} [Level: %i]{999999}: {999999}(Tempo conectado: {FFFFFF}%s{999999})\n", AdminList,AdminLevelName[APlayerData[i][PlayerLevel]], Name, i, APlayerData[i][PlayerLevel], Convert(APlayerData[i][TempoConectado])); // Add the name of the admin-player to the list
}
}
}
// Check if there were admin-names added to the list
if (strlen(AdminList) > 0)
{
format(AdminList, sizeof(AdminList), "%s\n{00FF00}%d {FFFFFF}Administradores {999999}", AdminList, Adm);
ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_MSGBOX, "{00FF00}ж {FFFFFF}Administradores online:", AdminList, "Fechar", "");
}
else
SendClientMessage(playerid, -1, "» {999999}Os {FFFFFF}administradores {999999}do servidor estгo offline no {00FF00}momento!"); // No admins are online
}
else
return false;
// Let the server know that this was a valid command
return true;
}
2 duvidas, sу que na verdade tu tб й pedindo pra fazerem as coisas por ti. O.o
|
1- Queria saber se existe algum sistema ou como fazer que se o Player erra o RCON 3 vezes ele й kickado.
|