SA-MP Forums Archive
[Ajuda] Pickup - 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] Pickup (/showthread.php?tid=566290)



Pickup - MarlboroBr - 04.03.2015

Olб, boa noite. Bom eu andei fazendo vбrios pickup's aqui e tals, porem eu queria saber se tem como liberar apenas para uma profissгo entrar nesse pickup.

Exemplo: Delegacia de LS - Somente Policiais entram nela...

Й porque eu fiz um pedбgio, e um posto, e tem como entrar nele, porйm eu queria que sу a Policia Rodoviбria Entrasse nele...

Obrigado!


Re: [ Dъvida ] Pickup - NexNix - 04.03.2015

Tem, й sу usar o if.

E quando vocк vai criar o tуpico tem o '' Prefix '' para colocar se й dъvida, pedido etc, nгo precisa colocar no tнtulo.


Re: [ Dъvida ] Pickup - ipsLuan - 04.03.2015

Use condiзхes.

PHP код:
if(Profissao[playerid] == 1) {
    
//Passagem liberada
}
else return 
SendClientMessage(playerid, -1"Apenas quem й da profissгo 1 pode entrar"); 



Re: Pickup - MarlboroBr - 04.03.2015

Luan, tentei aqui mais deu erro, como ficararia no caso?! Assim?
PHP код:
    {
        if( 
pInfoplayerid ][ Prof ] == POL_RODOVIARIA || aInfoplayerid ][ Gerente ] == || aInfoplayerid ][ Admin ] == )
        {
            if( 
pInfoplayerid ][ fardado ] == aInfoplayerid ][ Gerente ] == aInfoplayerid ][ Admin ] == )
            {
        else if( 
IsPlayerInRangeOfPointplayerid2.053.4001, -1530.75445.2698 )) // Pedagio
        
{
            
SetPlayerPosplayerid51.7680, -1530.50125.2866 );
            
pInfoplayerid ][ EntrouL ] = true;
            return 
1;
        }
                }
        } 
O normal й assim:
PHP код:
        else if( IsPlayerInRangeOfPointplayerid2.053.4001, -1530.75445.2698 )) // Pedagio
        
{
            
SetPlayerPosplayerid51.7680, -1530.50125.2866 );
            
pInfoplayerid ][ EntrouL ] = true;
            return 
1;
        } 



Re: Pickup - NexNix - 04.03.2015

Quais os erros e as linhas?
E o certo й && nгo &.


Re: Pickup - MarlboroBr - 04.03.2015

Erro "CreateHouse" creio eu que й erro de pontuaзгo aqui:
PHP код:
        else if( IsPlayerInRangeOfPointplayerid2.0627.5673, -571.794117.6481 )) // Delegacia Dillimore
        
{
            
SetPlayerPosplayerid246.375991109.2459941003.218750 );
            
SetPlayerInteriorplayerid10 );
            
SetPlayerVirtualWorldplayerid);
              
pInfoplayerid ][ EntrouL ] = true;
              
SetCameraBehindPlayerplayerid );
              
pInfoplayerid ][ entrouDEL ] = 1;
            return 
1;
        } 
// Esse que estou modificando o /entrar no pedagio: Obs: nгo й para interior, e como se fosse teleporte
        
else if( IsPlayerInRangeOfPointplayerid2.053.4001, -1530.75445.2698 )) // Pedagio
        
{
        if( 
pInfoplayerid ][ Prof ] == POL_RODOVIARIA 
        
{
            
SetPlayerPosplayerid51.7680, -1530.50125.2866 );
            
pInfoplayerid ][ EntrouL ] = true;
            return 
1;
        } 



Re: Pickup - Cidiei - 04.03.2015

Cade o fechamento apуs a condiзгo da variavel? Pode ser este o problema!

pawn Код:
if( pInfo[ playerid ][ Prof ] == POL_RODOVIARIA



Re: Pickup - MarlboroBr - 04.03.2015

Oshe, era isso e + 1 coisa, tive que adicionar mais uma chave, ficou assim:
PHP код:
        else if( IsPlayerInRangeOfPointplayerid2.053.4001, -1530.75445.2698 )) // Pedagio
        
{
        if( 
pInfoplayerid ][ Prof ] == POL_RODOVIARIA )
        {
             
SetPlayerPosplayerid51.7680, -1530.50125.2866 );
            
pInfoplayerid ][ EntrouL ] = true;
            return 
1;
        }
            else return 
SendClientMessage(playerid, -1"Apenas a Policia Rodoviaria pode entrar");
        } 
Funcionando, Agradeзo a vocкs 3, darei reputaзгo assim que estiver liberada! Obrigado !