Automatic Engine Start
#1

I use the following timer

pawn Код:
public EngineStart()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
            {
                new autoo = GetPlayerVehicleID(i);
                GetVehicleParamsEx(autoo,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(autoo,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                Motor[autoo] = true;
            }
            else
            {
                NoFuel[i] = 1;
                GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vehicle,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                CreateBox(i,"Benzin","~r~Der Tank dieses Fahrzeugs ist leer");
            }
        }
    }
    return 1;
}
Now i want to make the engine turn off when there is no player inside the vehicle, what is the best method?
Reply


Messages In This Thread
Automatic Engine Start - by Dripac - 24.03.2012, 16:39
Re : Automatic Engine Start - by KeeDee - 24.03.2012, 16:41
Re: Re : Automatic Engine Start - by Dripac - 24.03.2012, 16:42
Re: Automatic Engine Start - by emokidx - 24.03.2012, 16:48
Re: Automatic Engine Start - by Dripac - 24.03.2012, 16:54
Re: Automatic Engine Start - by Twisted_Insane - 24.03.2012, 17:00
Re: Automatic Engine Start - by Dripac - 24.03.2012, 17:15
Re: Automatic Engine Start - by Dripac - 25.03.2012, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)