Engine off OnVehicleSpawn -
Beckett - 04.09.2013
------
Re: Engine off OnVehicleSpawn -
jakejohnsonusa - 04.09.2013
We need to see some code to help...
Also if you want it off, you'll need a:
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vid, 0, lights, alarm, doors, bonnet, boot, objective);
Re: Engine off OnVehicleSpawn -
Beckett - 04.09.2013
------
Re: Engine off OnVehicleSpawn -
jakejohnsonusa - 04.09.2013
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:
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.");
Re: Engine off OnVehicleSpawn -
Beckett - 05.09.2013
------
Re: Engine off OnVehicleSpawn -
xganyx - 05.09.2013
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
return 1;
}
Re: Engine off OnVehicleSpawn -
Beckett - 05.09.2013
------
Re: Engine off OnVehicleSpawn -
Beckett - 05.09.2013
------
Re: Engine off OnVehicleSpawn -
dannyk0ed - 05.09.2013
ManualVehicleEngineAndLights();
Ongamemodeinit.
Re: Engine off OnVehicleSpawn -
Beckett - 05.09.2013
------