GetVehicleDoorState

From GT-MP
Jump to: navigation, search
GetVehicleDoorState
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Will return whether a specific vehicle door is opened or closed. If it returns true it is open and it returns false it is closed.


Syntax

In C#
Server-Side Function

bool API.getVehicleDoorState(NetHandle vehicle, int door);
  • vehicle: parameter input should be in NetHandle type.
  • door: parameter input should be in int type.

In Javascript
Client-Side Function

bool API.getVehicleDoorState(LocalHandle vehicle, int door);
  • vehicle: parameter input should be in LocalHandle type.
  • door: parameter input should be in int type.

Usage example(s)

In C#
Server-Side Function

if (API.getVehicleDoorState(someVehicleHandle, 0)) {
  // The door is open!
}

Changelog

Version Description
1.0 Release.

References