23.11.2012, 13:10
Hi.I need command engine on/off and lights on/off.Thanks

COMMAND:engineon(playerid, params[])
{
// Setup local variables
new vehicleid, engine,lights,alarm,doors,bonnet,boot,objective;
// Get the player's vehicle
vehicleid = GetPlayerVehicleID(playerid);
// Get the current status of the vehicle
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
// Set the engine and lights ON
SetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, objective);
return 1;
}
COMMAND:engineoff(playerid, params[])
{
// Setup local variables
new vehicleid, engine,lights,alarm,doors,bonnet,boot,objective;
// Get the player's vehicle
vehicleid = GetPlayerVehicleID(playerid);
// Get the current status of the vehicle
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
// Set the engine and lights OFF
SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);
return 1;
}