GetVehicleParamsCarDoors

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:57, 13 January 2017
Burridge (Talk | contribs)

← Previous diff
Current revision
OstGot (Talk | contribs)

Line 10: Line 10:
{{Param|backleft|The integer to save the state of the rear left door to (if available).}} {{Param|backleft|The integer to save the state of the rear left door to (if available).}}
{{Param|backright|The integer to save the state of the rear right door to (if available).}} {{Param|backright|The integer to save the state of the rear right door to (if available).}}
 +
 +{{Return|
 +* The vehicle's doors state is stored in the specified variables.}}
{{note| {{note|
Line 17: Line 20:
* 0: Closed * 0: Closed
}} }}
- 
{{RelatedFunctions}} {{RelatedFunctions}}

Current revision


This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Description:

Allows you to retrieve the current state of a vehicle's doors


Parameters:
(vehicleid, &driver, &passenger, &backleft, &backright)
vehicleidThe ID of the vehicle
driverThe integer to save the state of the driver's door to.
passengerThe integer to save the state of the passenger's door to.
backleftThe integer to save the state of the rear left door to (if available).
backrightThe integer to save the state of the rear right door to (if available).


Return Values:

  • The vehicle's doors state is stored in the specified variables.


Image:32px-Ambox_warning_orange.png

Note

The values returned in each variable are as follows:

  • -1: Door state not set
  • 1: Open
  • 0: Closed


Related Functions

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

Personal tools