VehicleClientChecked by LS:MP

getIsDoorValid

GET_IS_DOOR_VALID0x645F4B6E8499F632

The GTA V native GET_IS_DOOR_VALID of the VEHICLE namespace, as LS:MP client scripts call it: the global function getIsDoorValid, in JavaScript and in Lua.

SignatureJavaScript
getIsDoorValid(vehicle: Vehicle, doorId: number): boolean
SignatureLua
getIsDoorValid(vehicle: Vehicle, doorId: integer): boolean

Usage

JavaScript
const result = getIsDoorValid(vehicle, doorId);
Lua
local result = getIsDoorValid(vehicle, doorId)

Parameters

ParameterTypeJavaScriptLuaDescription
vehicleVehiclenumberinteger
doorIdintnumberintegersee setVehicleDoorShut

Returns

BOOL JavaScript boolean, Lua boolean

On LS:MP

ℹ
Checked by LS:MP

doorId must be between 0 and 6. Otherwise the call is ignored and returns false: nothing reaches the game, and no error is raised.

Reference

Namespace
Vehicle VEHICLE
In the game
BOOL GET_IS_DOOR_VALID(Vehicle vehicle, int doorId)
Hash
0x645F4B6E8499F632
Introduced
Game build 944 legacy numbering
Formerly
_DOES_VEHICLE_HAVE_DOOR _GET_IS_DOOR_VALID

Open in the interactive natives reference