[Ajuda] Comando /admins
#1

Olб meu comando /admins nao esta funcionando:
pawn Код:
COMMAND:admins(playerid, params[])
{
    // Setup local variables
    new AdminList[500], Name[24];

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/admins", params);

    // 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, 500, "%s%s: %s (id: %i), Level de admin: %i (RCON admin)\n", AdminList, AdminLevelName[APlayerData[i][PlayerLevel]], 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, 500, "%s%s: %s (id: %i), Level de admin: %i\n", AdminList, AdminLevelName[APlayerData[i][PlayerLevel]], 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_LIST, "Admins Online:", AdminList, "OK", "Cancelar");
        else
            SendClientMessage(playerid, 0xFF0000FF, "[MDC] Nгo tem admins online!"); // No admins are online
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
}
PPC_TRUCKING ^^

Quando eu digito da ServerUnckwonCommand
Reply


Messages In This Thread
Comando /admins - by CLANdok - 16.10.2013, 17:04
Re: Comando /admins - by N3XTMapper - 16.10.2013, 17:07
Re: Comando /admins - by CLANdok - 16.10.2013, 17:12
Re: Comando /admins - by N3XTMapper - 16.10.2013, 17:14
Re: Comando /admins - by CLANdok - 16.10.2013, 17:39
Re: Comando /admins - by PT - 16.10.2013, 17:45
Re: Comando /admins - by Mteck - 16.10.2013, 18:05
Re: Comando /admins - by Menor - 16.10.2013, 18:10
Re: Comando /admins - by Locky_ - 16.10.2013, 18:47
Re: Comando /admins - by CLANdok - 16.10.2013, 21:49

Forum Jump:


Users browsing this thread: 2 Guest(s)