SA-MP Forums Archive
Simple GetVehicleParamsEx Question - 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: Simple GetVehicleParamsEx Question (/showthread.php?tid=399661)



Simple GetVehicleParamsEx Question - jakejohnsonusa - 15.12.2012

How do I check if an engine in on using GetVehicleParamsEx ? This will be for deciding if my car's engine should turn on or turn off.

Thanks: jakejohnsonusa


Re: Simple GetVehicleParamsEx Question - Mean - 15.12.2012

pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == 1) {
    // ENGINE IS RUNNING
}
else {
    // ENGINE IS NOT RUNNING
}
You can use #pragma unused to eliminate the variables you didn't use, such as lights, alarm, etc.


Re: Simple GetVehicleParamsEx Question - jakejohnsonusa - 15.12.2012

Thanks!

+1 Rep