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
Post here what you have done, by the way if you're resquesting that, it should be in the following thread "request's thread".
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;
}
ok i will try the /engine off but i very need speedo meter in car.. only i car not in plane..