Vehicles Engine On/off and speed meter
#4

Engine On/Off by Igetty i just make it /engine to on/off it
this is using ZCMD include by Zeex.

pawn Код:
//top of script
new Engine[MAX_VEHICLES], Lights[MAX_VEHICLES];

//put this under ongamemodeinit
    ManualVehicleEngineAndLights();

public OnVehicleSpawn(vehicleid)
{
    Engine[vehicleid] = 0;
        Lights[vehicleid] = 0;
    return 1;
}

CMD:engine(playerid, params[])
{
    if(GetPlayerState(playerid) == 2)
    {
        new vehicle = GetPlayerVehicleID(playerid);
        if(Engine[vehicle] == 0)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            Engine[vehicle] = 1;
            GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0);
        }
        else
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            Engine[vehicle] = 0;
            GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicle, 0, lights, alarm, doors, bonnet, boot, 0);
        }
    }
    else return SendClientMessage(playerid, COLOR_GRAY, "/Engine to Start & Stop Vehicle Engine!");
    return 1;
}

CMD:lights(playerid, params[])
{
    if(GetPlayerState(playerid) == 2)
    {
        new vehicle = GetPlayerVehicleID(playerid);
        if(Lights[vehicle] == 0)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            Lights[vehicle] = 1;
            GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicle, engine, 1, alarm, doors, bonnet, boot, 0);
        }
        else
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            Lights[vehicle] = 0;
            GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicle, engine, 0, alarm, doors, bonnet, boot, 0);
        }
    }
    else return SendClientMessage(playerid, COLOR_GRAY, "/lights to Turn on & off Vehicle Light!");
    return 1;
}
if i help u with engine/light script rep+ me
Reply


Messages In This Thread
Vehicles Engine On/off and speed meter - by Tuntun - 13.07.2012, 13:30
Re: Vehicles Engine On/off and speed meter - by leonardo1434 - 13.07.2012, 13:32
Re: Vehicles Engine On/off and speed meter - by clarencecuzz - 13.07.2012, 13:32
Re: Vehicles Engine On/off and speed meter - by Devilxz97 - 13.07.2012, 13:39
Re: Vehicles Engine On/off and speed meter - by Tuntun - 13.07.2012, 14:41

Forum Jump:


Users browsing this thread: 1 Guest(s)