[Ajuda] veiculos spawnar desligado.
#6

Vocк troca sua variavel motor[MAX_PLAYERS] por new bool:motor[MAX_VEHICLES];

No OnVehicleSpawn vocк coloca:
Код:
motor[vehicleid] = false;
SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
Seu comando /motor ficarб assim:
Код:
if(strcmp("/motor",cmdtext,true,6)==0)
    {
        if(!IsPlayerInAnyVehicle(playerid))
    		return SendClientMessage(playerid,COLOR_AVISO,"Vocк precisa estar em um veнculo!");

        new carro = GetPlayerVehicleID(playerid);

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

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

		if(carro != INVALID_VEHICLE_ID)
        {
            if(motor[carro])
            {
                SetVehicleParamsEx(carro, 0, 0, 0, 0, 0, 0, 0);
                SendClientMessage(playerid, COLOR_BRANCOM, "Motor do veiculo desligado");
                motor[carro] = false;
            }
            else
            {
                SetVehicleParamsEx(carro, 1, 0, 0, 0, 0, 0, 0);
                SendClientMessage(playerid, COLOR_BRANCOM, "Motor do veiculo desligado");
                motor[carro] = true;
            }
        }
        return 1;
    }
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)