[Ajuda] veiculos spawnar desligado.
#1

Olб pessoal do fуrum samp

Й o seguinte meu GM antes os carros fica ligado ai fiz um jeito para os carros ficarem sempre desligados atй ai tudo bem...

Ae os carros respawnava ligado ai tambйm fiz um jeito para o veiculo spawnar desligado ai que vem o problema: quando uso o /motor ele liga normal mas depois do respawn eu uso /motor ae o carro ja ta desligado ae desliga dnv entгo tenho que usar o /motor 2 vezes

me ajudem galera ja tentei de tudo mudar o /motor e mechi no onvehiclespawn

Код:
if(strcmp("/motor",cmdtext,true,6)==0)
    {
        if(!IsPlayerInAnyVehicle(playerid))
		{
			SendClientMessage(playerid,COLOR_AVISO,"Vocк precisa estar em um veнculo!");
			return 1;
		}
		new State;
		new mot, lu, alar, por, cap, porma, ob;
        new carro = GetPlayerVehicleID(playerid);

     	new vid = GetPlayerVehicleID(playerid);
      	if(Gas[vid] == 0)
        		return SendClientMessage(playerid,COLOR_GRAD2," Veiculo sem Combustivel");
  		if(LigadoDesligado2[vid] == 1)
		{
		    motor[playerid] = 1;
		}
  		if(LigadoDesligado2[vid] == 0)
		{
		    motor[playerid] = 0;
		}

		State=GetPlayerState(playerid);
        if(State!=PLAYER_STATE_DRIVER)
        {
        	SendClientMessage(playerid,COLOR_AVISO,"   Vocк nгo й o motorista do carro !");
            return true;
        }

		if(carro != INVALID_VEHICLE_ID)
        {
            if(motor[playerid] == 0)
            {
                GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
                motor[playerid] = 1;
                LigadoDesligado2[carro] = 1;
                SendClientMessage(playerid, COLOR_BRANCOM, "Motor do veiculo ligado");
            }
            else
            {
                GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
                motor[playerid] = 0;
                LigadoDesligado2[carro] = 0;
                SendClientMessage(playerid, COLOR_BRANCOM, "Motor do veiculo desligado");
            }
        }
        return 1;
    }
Код:
public OnVehicleSpawn(vehicleid)
{
    new mot, lu, alar, por, cap, porma, ob;
    GetVehicleParamsEx(vehicleid, mot, lu, alar, por, cap, porma, ob);
    SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
	if(IsAPRCar(vehicleid))
	{
     	AddVehicleComponent(vehicleid,1087);
		AddVehicleComponent(vehicleid,1073);
	}
	SaveLastPosition(vehicleid);
	return true;
}
Reply


Messages In This Thread
veiculos spawnar desligado. - by vitorluiz96 - 27.04.2015, 16:48
Re: veiculos spawnar desligado. - by ReyMysterio - 27.04.2015, 16:57
Re: veiculos spawnar desligado. - by DiegoCosta - 27.04.2015, 17:11
Re: veiculos spawnar desligado. - by vitorluiz96 - 27.04.2015, 23:14
Re: veiculos spawnar desligado. - by vitorluiz96 - 27.04.2015, 23:16
Re: veiculos spawnar desligado. - by GabrielDias_Invision - 27.04.2015, 23:24
Re: veiculos spawnar desligado. - by vitorluiz96 - 27.04.2015, 23:27
Re: veiculos spawnar desligado. - by GabrielDias_Invision - 27.04.2015, 23:42
Re: veiculos spawnar desligado. - by vitorluiz96 - 27.04.2015, 23:52
Re: veiculos spawnar desligado. - by GabrielDias_Invision - 27.04.2015, 23:58

Forum Jump:


Users browsing this thread: 1 Guest(s)