SA-MP Forums Archive
[Ajuda] Ao entrar no carro nao manda a mensagem - 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] Ao entrar no carro nao manda a mensagem (/showthread.php?tid=487858)



Ao entrar no carro nao manda a mensagem - standart - 15.01.2014

PHP код:
new VConcessionaria[13]; 
PHP код:
    //=================================================CONCERCIONБRIA DE USADOS===========================//
    
VConcessionaria[0] = AddStaticVehicleEx(401,1003.2000100,-1368.8000500,13.1000000,0.0000000,54,65,15); //Bravura
    
VConcessionaria[1] = AddStaticVehicleEx(436,1007.2999900,-1368.5999800,13.2000000,0.0000000,105,88,15); //Previon
    
VConcessionaria[2] = AddStaticVehicleEx(404,1015.5000000,-1346.1999500,13.2000000,90.0000000,105,88,15); //Perrenial
    
VConcessionaria[3] = AddStaticVehicleEx(410,1011.2000100,-1368.9000200,13.1000000,0.0000000,93,27,15); //Manana
    
VConcessionaria[4] = AddStaticVehicleEx(527,1015.0000000,-1368.9000200,13.2000000,0.0000000,123,113,15); //Cadrona
    
VConcessionaria[5] = AddStaticVehicleEx(518,1015.5000000,-1350.0000000,13.2000000,90.0000000,94,112,15); //Buccaneer
    
VConcessionaria[6] = AddStaticVehicleEx(508,1025.0999800,-1358.3000500,14.2000000,90.0000000,245,245,15); //Journey
    
VConcessionaria[7] = AddStaticVehicleEx(422,1015.4000200,-1357.5999800,13.5000000,90.0000000,108,132,15); //Bobcat
    
VConcessionaria[8] = AddStaticVehicleEx(542,1015.0999800,-1362.0000000,13.2000000,88.0000000,91,93,15); //Clover
    
VConcessionaria[9] = AddStaticVehicleEx(543,1015.5000000,-1353.9000200,13.3000000,90.0000000,30,46,15); //Sadler
    
VConcessionaria[10] = AddStaticVehicleEx(413,1025.9000200,-1346.5999800,13.9000000,92.0000000,100,104,15); //Pony
    
VConcessionaria[11] = AddStaticVehicleEx(525,1025.8000500,-1350.5000000,13.7000000,90.0000000,37,37,15); //Tow Truck
    
VConcessionaria[12] = AddStaticVehicleEx(582,1025.4000200,-1354.4000200,13.9000000,90.0000000,111,103,15); //Newsvan 
PHP код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
        if(
newstate == PLAYER_STATE_DRIVERVerificarVeiculo(playerid);
        return 
1;

PHP код:
forward VerificarVeiculo(playerid);
public 
VerificarVeiculo(playerid)
{
    for(new 
0<= 13c++)
    {
        if(
IsPlayerInVehicle(playeridVMafiaRussa[c]) && PlayerInfo[playerid][pMembro] != 1)    return  RemovePlayerFromVehicle(playerid);
          if(
IsPlayerInVehicle(playeridVGoverno[c]) && PlayerInfo[playerid][pMembro] != 3)       return  RemovePlayerFromVehicle(playerid);
        if(
IsPlayerInVehicle(playeridVPoliciaMilitar[c]) && PlayerInfo[playerid][pMembro] != 5)return  RemovePlayerFromVehicle(playerid);
        if(
IsPlayerInVehicle(playeridVConcessionaria[c]))  return  SCM(playeridCOR_AZUL_CLARO"MODELO: /N PREЗO:");
    }
    return 
1;

o codigo expulsa quem nao for das orgs dos outros carros normais, mas nao manda a mensagem para quem entra nos carros da concessionбria


Re: Ao entrar no carro nao manda a mensagem - yNexus - 15.01.2014

Quote:
Originally Posted by standart
Посмотреть сообщение
PHP код:
new VConcessionaria[13]; 
PHP код:
    //=================================================CONCERCIONБRIA DE USADOS===========================//
    
VConcessionaria[0] = AddStaticVehicleEx(401,1003.2000100,-1368.8000500,13.1000000,0.0000000,54,65,15); //Bravura
    
VConcessionaria[1] = AddStaticVehicleEx(436,1007.2999900,-1368.5999800,13.2000000,0.0000000,105,88,15); //Previon
    
VConcessionaria[2] = AddStaticVehicleEx(404,1015.5000000,-1346.1999500,13.2000000,90.0000000,105,88,15); //Perrenial
    
VConcessionaria[3] = AddStaticVehicleEx(410,1011.2000100,-1368.9000200,13.1000000,0.0000000,93,27,15); //Manana
    
VConcessionaria[4] = AddStaticVehicleEx(527,1015.0000000,-1368.9000200,13.2000000,0.0000000,123,113,15); //Cadrona
    
VConcessionaria[5] = AddStaticVehicleEx(518,1015.5000000,-1350.0000000,13.2000000,90.0000000,94,112,15); //Buccaneer
    
VConcessionaria[6] = AddStaticVehicleEx(508,1025.0999800,-1358.3000500,14.2000000,90.0000000,245,245,15); //Journey
    
VConcessionaria[7] = AddStaticVehicleEx(422,1015.4000200,-1357.5999800,13.5000000,90.0000000,108,132,15); //Bobcat
    
VConcessionaria[8] = AddStaticVehicleEx(542,1015.0999800,-1362.0000000,13.2000000,88.0000000,91,93,15); //Clover
    
VConcessionaria[9] = AddStaticVehicleEx(543,1015.5000000,-1353.9000200,13.3000000,90.0000000,30,46,15); //Sadler
    
VConcessionaria[10] = AddStaticVehicleEx(413,1025.9000200,-1346.5999800,13.9000000,92.0000000,100,104,15); //Pony
    
VConcessionaria[11] = AddStaticVehicleEx(525,1025.8000500,-1350.5000000,13.7000000,90.0000000,37,37,15); //Tow Truck
    
VConcessionaria[12] = AddStaticVehicleEx(582,1025.4000200,-1354.4000200,13.9000000,90.0000000,111,103,15); //Newsvan 
PHP код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
        if(
newstate == PLAYER_STATE_DRIVERVerificarVeiculo(playerid);
        return 
1;

PHP код:
forward VerificarVeiculo(playerid);
public 
VerificarVeiculo(playerid)
{
    for(new 
0<= 13c++)
    {
        if(
IsPlayerInVehicle(playeridVMafiaRussa[c]) && PlayerInfo[playerid][pMembro] != 1)    return  RemovePlayerFromVehicle(playerid);
          if(
IsPlayerInVehicle(playeridVGoverno[c]) && PlayerInfo[playerid][pMembro] != 3)       return  RemovePlayerFromVehicle(playerid);
        if(
IsPlayerInVehicle(playeridVPoliciaMilitar[c]) && PlayerInfo[playerid][pMembro] != 5)return  RemovePlayerFromVehicle(playerid);
        if(
IsPlayerInVehicle(playeridVConcessionaria[c]))  return  SCM(playeridCOR_AZUL_CLARO"MODELO: /N PREЗO:");
    }
    return 
1;

o codigo expulsa quem nao for das orgs dos outros carros normais, mas nao manda a mensagem para quem entra nos carros da concessionбria
https://sampwiki.blast.hk/wiki/SendClientMessage


Re: Ao entrar no carro nao manda a mensagem - standart - 15.01.2014

eu defini la no topo do meu GM
Quote:

#define SCM SendClientMessage




Re: Ao entrar no carro nao manda a mensagem - standart - 16.01.2014

Ainda nгo consegui, me ajudem por favor, se alguйm souber outra maneira de declarar veнculos, me mandem sugestхes ou algo assim.


Re: Ao entrar no carro nao manda a mensagem - yNexus - 16.01.2014

Tenta usar SendClientMessage normal no lugar do SCM


Re: Ao entrar no carro nao manda a mensagem - standart - 16.01.2014

Obrigado por tentar ajudar, mas tenho certeza que esse nгo й o problema.