Me ajuda a configurar o comando /setaradmin ?
#2

Код:
    if( !strcmp( cmd, "/staff", true ))
    {
        if( dini_Int( f( playerid ), "Patrao" ) == 0 )
        {
            return 0;
        }
        tmp = strtok( cmdtext, idx );
          if( !strlen( tmp ))
          {
              SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /Staff [ Admin ] [ ID ]" );
            return 1;
        }
                else if( !strcmp( tmp, "Admin", true ))
        {
            tmp = strtok( cmdtext, idx );
            if( !strlen( tmp ))
            {
                SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /Staff [ Admin ] [ ID ]" );
                return 1;
            }
            new
                id = strval( tmp )
            ;
            if( !IsPlayerConnected( id ))
            {
                SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" );
                return 1;
            }
            if( aInfo[ id ][ Administrador ] == 0 )
            {
                format( gstring, sizeof( gstring ), "[ > ] Vocк tornou um gerente o jogador '%s'.", PlayerName( id ));
                SendClientMessage( playerid, 0x66FF00AA, gstring );
                format( gstring, sizeof( gstring ), "( PARABЙNS ) Vocк recebeu privilegios de gerente por '%s'.", PlayerName( playerid ));
                SendClientMessage( id, 0x66FF00AA, gstring );
                aInfo[ id ][ administrador ] = 1;
                dini_IntSet( f( id ), "Adminstrador", 1 );
            }
            else if( aInfo[ id ][ Administrador ] == 1 )
            {
                format( gstring, sizeof( gstring ), "[ > ] Vocк removeu os privilйgios de administrador de '%s'.", PlayerName( id ));
                SendClientMessage( playerid, 0x66FF00AA, gstring );
                format( gstring, sizeof( gstring ), "[ INFO ] '%s' removeu os privilйgios de administrador de vocк.", PlayerName( playerid ));
                SendClientMessage( id, 0x66FF00AA, gstring );
                aInfo[ id ][ Administrador ] = 0;
                dini_IntSet( f( id ), "Adminstrador", 0 );
            }
            return 1;
        }
Reply


Messages In This Thread
Me ajuda a configurar o comando /setaradmin ? - by MarlboroBr - 14.02.2015, 00:45
Re: Me ajuda a configurar o comando /setaradmin ? - by ThuuGLif3 - 14.02.2015, 02:40
Re: Me ajuda a configurar o comando /setaradmin ? - by MarlboroBr - 14.02.2015, 02:47
Re: Me ajuda a configurar o comando /setaradmin ? - by ThuuGLif3 - 14.02.2015, 02:49
Re: Me ajuda a configurar o comando /setaradmin ? - by MarlboroBr - 14.02.2015, 03:05
Re: Me ajuda a configurar o comando /setaradmin ? - by ThuuGLif3 - 14.02.2015, 03:11
Re: Me ajuda a configurar o comando /setaradmin ? - by MarlboroBr - 14.02.2015, 04:28

Forum Jump:


Users browsing this thread: 2 Guest(s)