SA-MP Forums Archive
[Ajuda] /Admins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /Admins (/showthread.php?tid=437301)



/Admins - clerISoN - 15.05.2013

Alguem ajuda fazer o comando? dcmd(admins,6,cmdtext;


Re: /Admins - Lуs - 15.05.2013

pawn Код:
new
    admins_avaiable,
    adm_name [ MAX_PLAYER_NAME ],
    str_text [ 128 ];

SendClientMessage ( playerid, -1, "Administradores Disponнveis:");

for ( new s = GetMaxPlayers ( ), i; i < s; i ++ )
{
    if ( IsPlayerConnected ( i ) || i != INVALID_PLAYER_ID )
    {
        if ( /*Variбvel administrativa do jogador*/[ i ] > 0 )
        {
            admins_avaiable++;
            GetPlayerName ( i, adm_name, MAX_PLAYER_NAME );
            format ( str_text, sizeof str_text, "%s", adm_name );
            SendClientMessage ( playerid, -1, str_text );
        }
    }
}

if ( admins_avaiable == 0 )
    return SendClientMessage ( playerid, -1, "Nenhum" );