GetVehicleParamsEx

From SA-MP Wiki

Jump to: navigation, search


GetVehicleParamsEx was added in SA-MP 0.3c This function was added in SA-MP 0.3c and will not work in earlier versions!


Description:

Gets a vehicle's parameters.


Parameters:
(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective)
vehicleidThe ID of the vehicle to get the parameters from.
&engineGet the engine status. If 1, the engine is running..
&lightsGet the vehicle's lights' state. If 1 the lights are on.
&alarmGet the vehicle's alarm state. If 1 the alarm is (or was) sounding.
&doorsGet the lock status of the doors. If 1 the doors are locked.
&bonnetGet the bonnet/hood status. If 1, it's open.
&bootGet the boot/trunk status. 1 means it is open.
&objectiveGet the objective status. 1 means the objective is on.


Return Values:

This function does not return any specific values.


Image:32px-Ambox_warning_orange.png

Note

If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset').


Example Usage:

new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
//This would cause all the variable above, to become the status of its subject.

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox