[HELP] Fuel
#3

pawn Код:
if (newkeys & KEY_NO)
    {
        if(GetPlayerState(playerid) == 2)
        {
             //This part here is defining the vehicle ID that the player is currently in.
            new engine, lights, alarm, doors, bonnet, boot, objective; //This is defining the vehicles current items.
            GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);//This is checking the vehicle's engine/lights/alarm/doors/bonnet/boot/objective status.
            if(Engine[vehicle] == 0) //This is checking if the engine of the vehicle, is turned off or not.
            {
                Engine[vehicle] = 1; //This is setting the global variable that you created at the beginning.
                SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0); //This is setting the vehicles engine to be on.
                GameTextForPlayer(playerid, "~w~ENGINE ~g~ON...", 1000, 6);
            }
            else
            {
                Engine[vehicle] = 0; //This is setting the global variable that you created at the beginning.
                SetVehicleParamsEx(vehicle, 0, lights, alarm, doors, bonnet, boot, 0); //This is setting the vehicles engine to be on.
                GameTextForPlayer(playerid, "~w~ENGINE ~r~OFF...", 1000, 6);
            }
        }
    }
i don't see anything wrong here though

well maybe the checkgas() is loading more than 1 time ?
Reply


Messages In This Thread
[HELP] Fuel - by monster010 - 22.05.2014, 11:03
Re: [HELP] Fuel - by monster010 - 23.05.2014, 09:17
Re: [HELP] Fuel - by Fred1993 - 23.05.2014, 09:48
Re: [HELP] Fuel - by monster010 - 23.05.2014, 09:58
Re : [HELP] Fuel - by yusei - 23.05.2014, 10:01
Re: [HELP] Fuel - by monster010 - 23.05.2014, 10:11
Re : [HELP] Fuel - by yusei - 23.05.2014, 10:12
Re: [HELP] Fuel - by monster010 - 23.05.2014, 10:14
Re : [HELP] Fuel - by yusei - 23.05.2014, 10:21
Re: [HELP] Fuel - by monster010 - 23.05.2014, 10:25

Forum Jump:


Users browsing this thread: 2 Guest(s)