Simple GetVehicleParamsEx Question
#1

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
Reply
#2

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.
Reply
#3

Thanks!

+1 Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)