04.09.2013, 20:48
Hmm, I'm a bit confused what the problem is exactly. I assume you mean that it doesn't work at all... ("doesnt turn the engine off of the vehicle when it spawns" ... spawns in the beginning?)
But this would fix it, it will ignore the variable (if it's bugged) and force it on or off:
But this would fix it, it will ignore the variable (if it's bugged) and force it on or off:
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine != 1)//Checks the engine status rather than the variable
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
Engine[vehicle] = 1;
SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0);
}
else return SendClientMessage(playerid, COLOR_GREY, "This vehicle's engine is already off.");