[Ajuda] Bloquear Comando Para Procurados
#1

Queria que os Jogadores procurados nгo conseguissem usar esse comando, aparecer uma mensagem tipo: "vocк estб procurado e nгo pode usar esse comando"

pawn Код:
if( !strcmp( cmdtext, "/consertar", true ))
    {
  if( pInfo[ playerid ][ PLAYER_VIP ] == 1 || dini_Int( f( playerid ), "*******r" ) == 1 || pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Ajudante ] == 1 || aInfo[ playerid ][ Moderador ] == 1 )
        {
            if( !IsPlayerInAnyVehicle( playerid ))
            {
                SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
                return 1;
            }
            SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" );
            new
                v = GetPlayerVehicleID( playerid )
            ;
            resetNeon( playerid );
            SetVehicleHealth( v, 1000 );
            RepairVehicle( v );
            PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 );
        }
        else
        {
            SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
        }
        return 1;
    }
Reply
#2

PHP код:
if(GetPlayerWantedLevel(playerid) >= 1) return SendClientMessage(playerid, -1"Vocк estб sendo procurado"); 
Reply
#3

PHP код:
if( !strcmpcmdtext"/consertar"true ))
{
    if( 
pInfoplayerid ][ PLAYER_VIP ] == || dini_Intfplayerid ), "*******r" ) == || pInfoplayerid ][ Prof ] == MECANICO || aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Ajudante ] == || aInfoplayerid ][ Moderador ] == )
    {
        if( !
IsPlayerInAnyVehicleplayerid ))
        {
            
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo estб em um veнculo !" );
            return 
1;
        }
        if(
GetPlayerWantedLevel(playerid) >= 1)
        {
            
SendClientMessage(playerid,-1,"ERRO: Vocк estб procurado e nгo pode usar esse comando.");
            return 
1;
        }
        
SendClientMessageplayeridCOLOR_AMARELO"[ > ] Veнculo consertado !" );
        new 
GetPlayerVehicleIDplayerid );
        
resetNeonplayerid );
        
SetVehicleHealthv1000 );
        
RepairVehicle);
        
PlayerPlaySoundplayerid10570.00.010.0 );
    }
    else
    {
        
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by zCyan
Посмотреть сообщение
PHP код:
if( !strcmpcmdtext"/consertar"true ))
{
    if( 
pInfoplayerid ][ PLAYER_VIP ] == || dini_Intfplayerid ), "*******r" ) == || pInfoplayerid ][ Prof ] == MECANICO || aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Ajudante ] == || aInfoplayerid ][ Moderador ] == )
    {
        if( !
IsPlayerInAnyVehicleplayerid ))
        {
            
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo estб em um veнculo !" );
            return 
1;
        }
        if(
GetPlayerWantedLevel(playerid) >= 1)
        {
            
SendClientMessage(playerid,-1,"ERRO: Vocк estб procurado e nгo pode usar esse comando.");
            return 
1;
        }
        
SendClientMessageplayeridCOLOR_AMARELO"[ > ] Veнculo consertado !" );
        new 
GetPlayerVehicleIDplayerid );
        
resetNeonplayerid );
        
SetVehicleHealthv1000 );
        
RepairVehicle);
        
PlayerPlaySoundplayerid10570.00.010.0 );
    }
    else
    {
        
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
    }
    return 
1;

funcionou Mano, vlw <3
Reply
#5

Quote:
Originally Posted by zCyan
Посмотреть сообщение
PHP код:
if( !strcmpcmdtext"/consertar"true ))
{
    if( 
pInfoplayerid ][ PLAYER_VIP ] == || dini_Intfplayerid ), "*******r" ) == || pInfoplayerid ][ Prof ] == MECANICO || aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Ajudante ] == || aInfoplayerid ][ Moderador ] == )
    {
        if( !
IsPlayerInAnyVehicleplayerid ))
        {
            
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo estб em um veнculo !" );
            return 
1;
        }
        if(
GetPlayerWantedLevel(playerid) >= 1)
        {
            
SendClientMessage(playerid,-1,"ERRO: Vocк estб procurado e nгo pode usar esse comando.");
            return 
1;
        }
        
SendClientMessageplayeridCOLOR_AMARELO"[ > ] Veнculo consertado !" );
        new 
GetPlayerVehicleIDplayerid );
        
resetNeonplayerid );
        
SetVehicleHealthv1000 );
        
RepairVehicle);
        
PlayerPlaySoundplayerid10570.00.010.0 );
    }
    else
    {
        
SendClientMessageplayeridCOLOR_ERRO"[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
    }
    return 
1;

Dava pra vocк resumir o comando em poucas linhas utilizando o return...
Alguns brackets sгo desnecessбrios...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)