SA-MP Forums Archive
[Ajuda] Carro nгo liga! - 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] Carro nгo liga! (/showthread.php?tid=607155)



Carro nгo liga! - best95 - 15.05.2016

eu tenho carros espalhados no mapa porem eles nгo ligam quando eu entro em um deles. estou com problema pois coloquei para ligar as luzes de dia. com o comandos /car ele pega normalmente porem os carros que spawna quando ligo o server nгo liga quando o player entra dentro deles ele fica sem ligar nao anda.

codigo:


pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new veh = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(veh, engine, lights, alarm,doors, bonnet, boot, objective);
    SetVehicleParamsEx(veh, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
    LigarCarro(playerid);
    VeiculoOcupado[vehicleid] = true;
    if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid, 0.0);
    {
        SendClientMessage(playerid, Vermelho, " [ x ] === ANTI FURTO CAR ===");
    }
    return 1;
}



Re: Carro nгo liga! - iSoaD - 15.05.2016

-.-'


Re: Carro nгo liga! - best95 - 16.05.2016

Quote:
Originally Posted by iSoaD
Посмотреть сообщение
Tente isso
PHP код:
public OnGameModeInit()
{
    
LigarVeiculos(); // quando o servidor ligar vai chamar a stock que vai fazer a funзгo que estiver dentro dela funcionar
    
return 1
} 
Final da GM
PHP код:
stock LigarVeiculos()
{
    
//Aqui vocк coloca a funзгo que liga todos os carros
    
return 1;
} 
@Edit
se ajudei fala
ERRO:

pawn Код:
warning 202: number of arguments does not match definition

LINHA:     
LigarCarro();



Re: Carro nгo liga! - SkyneTSAMP - 16.05.2016

@Ignore.


Re: Carro nгo liga! - n0minal - 16.05.2016

Kkkkkkk tragam um Уscar pra esses caras, duas pйrolas seguidas


Re: Carro nгo liga! - best95 - 16.05.2016

Quote:
Originally Posted by SkyneTSAMP
Посмотреть сообщение
LigarVeiculos();
MINHA STOCK EH LigarCarro e nгo LigarVeiculos.


Re: Carro nгo liga! - best95 - 16.05.2016

@TOPICO FECHADO


OBS: PROBLEMA SOLUCIONADO!!!