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( pInfo[ playerid ][ Prof ] == POL_RODOVIARIA || aInfo[ playerid ][ Gerente ] == 1 || aInfo[ playerid ][ Admin ] == 1 )
{
if( pInfo[ playerid ][ fardado ] == 0 & aInfo[ playerid ][ Gerente ] == 1 & aInfo[ playerid ][ Admin ] == 1 )
{
else if( IsPlayerInRangeOfPoint( playerid, 2.0, 53.4001, -1530.7544, 5.2698 )) // Pedagio
{
SetPlayerPos( playerid, 51.7680, -1530.5012, 5.2866 );
pInfo[ playerid ][ EntrouL ] = true;
return 1;
}
}
}
O normal й assim:
PHP код:
else if( IsPlayerInRangeOfPoint( playerid, 2.0, 53.4001, -1530.7544, 5.2698 )) // Pedagio
{
SetPlayerPos( playerid, 51.7680, -1530.5012, 5.2866 );
pInfo[ playerid ][ 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( IsPlayerInRangeOfPoint( playerid, 2.0, 627.5673, -571.7941, 17.6481 )) // Delegacia Dillimore
{
SetPlayerPos( playerid, 246.375991, 109.245994, 1003.218750 );
SetPlayerInterior( playerid, 10 );
SetPlayerVirtualWorld( playerid, 1 );
pInfo[ playerid ][ EntrouL ] = true;
SetCameraBehindPlayer( playerid );
pInfo[ playerid ][ entrouDEL ] = 1;
return 1;
} // Esse que estou modificando o /entrar no pedagio: Obs: nгo й para interior, e como se fosse teleporte
else if( IsPlayerInRangeOfPoint( playerid, 2.0, 53.4001, -1530.7544, 5.2698 )) // Pedagio
{
if( pInfo[ playerid ][ Prof ] == POL_RODOVIARIA
{
SetPlayerPos( playerid, 51.7680, -1530.5012, 5.2866 );
pInfo[ playerid ][ 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( IsPlayerInRangeOfPoint( playerid, 2.0, 53.4001, -1530.7544, 5.2698 )) // Pedagio
{
if( pInfo[ playerid ][ Prof ] == POL_RODOVIARIA )
{
SetPlayerPos( playerid, 51.7680, -1530.5012, 5.2866 );
pInfo[ playerid ][ 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 !