[HELP] Engine
#1

I make a sistem engine but is not work, why?

pawn Код:
if (newkeys & KEY_NO)
    {
        if(GetPlayerState(playerid) == 2)
        {
            new vehicle = GetPlayerVehicleID(playerid); //This part here is defining the vehicle ID that the player is currently in.
            if(Engine[vehicle] == 0) //This is checking if the engine of the vehicle, is turned off or not.
            {
                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.
                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, "~g~ENGINE ON...", 5000, 2);
            }
        }
        else return SendClientMessage(playerid, COLOR_GREY, "* Engine already running*");
    }
    if (newkeys & KEY_NO)
    {
        if(GetPlayerState(playerid) == 2)
        {
            new vehicle = GetPlayerVehicleID(playerid); //This part here is defining the vehicle ID that the player is currently in.
            if(Engine[vehicle] == 1) //This is checking if the engine of the vehicle, is turned off or not.
            {
                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.
                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, "~r~ENGINE OFF...", 5000, 2);
            }
        }
    }
Reply


Messages In This Thread
[HELP] Engine - by monster010 - 30.04.2014, 11:59
Re: [HELP] Engine - by Galletziz - 30.04.2014, 12:04
Re: [HELP] Engine - by Konstantinos - 30.04.2014, 12:07
Re: [HELP] Engine - by monster010 - 30.04.2014, 12:18

Forum Jump:


Users browsing this thread: 1 Guest(s)