SA-MP Forums Archive
Vehicles Engine On/off and speed meter - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicles Engine On/off and speed meter (/showthread.php?tid=359246)



Vehicles Engine On/off and speed meter - Tuntun - 13.07.2012

Hello
please help me with create a cmd's it is engine off/on the cmd's will be /engine on and /engine off

Please help me with car speedo meter.. please.... i want in speedo meter Car fuel,speed,health,car name
and the car sppedo meter must be in car not in plane's...


Re: Vehicles Engine On/off and speed meter - leonardo1434 - 13.07.2012

Post here what you have done, by the way if you're resquesting that, it should be in the following thread "request's thread".


Re: Vehicles Engine On/off and speed meter - clarencecuzz - 13.07.2012

https://sampforum.blast.hk/showthread.php?tid=187229


Re: Vehicles Engine On/off and speed meter - Devilxz97 - 13.07.2012

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


Re: Vehicles Engine On/off and speed meter - Tuntun - 13.07.2012

ok i will try the /engine off but i very need speedo meter in car.. only i car not in plane..