ObjectClient

doorSystemSetAutomaticDistance

DOOR_SYSTEM_SET_AUTOMATIC_DISTANCE0x9BA001CB45CBF627

The GTA V native DOOR_SYSTEM_SET_AUTOMATIC_DISTANCE of the OBJECT namespace, as LS:MP client scripts call it: the global function doorSystemSetAutomaticDistance, in JavaScript and in Lua.

SignatureJavaScript
doorSystemSetAutomaticDistance(
  doorHash: Hash,
  distance: number,
  requestDoor: boolean,
  forceUpdate: boolean
): void
SignatureLua
doorSystemSetAutomaticDistance(
  doorHash: Hash,
  distance: number,
  requestDoor: boolean,
  forceUpdate: boolean
)

Usage

JavaScript
doorSystemSetAutomaticDistance(doorHash, distance, requestDoor, forceUpdate);
Lua
doorSystemSetAutomaticDistance(doorHash, distance, requestDoor, forceUpdate)

Parameters

ParameterTypeJavaScriptLua
doorHashHashnumberinteger
distancefloatnumbernumber
requestDoorBOOLbooleanboolean
forceUpdateBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

forceUpdate on true invokes doorSystemSetDoorState otherwise requestDoor is unused.

Reference

Namespace
Object OBJECT
In the game
void DOOR_SYSTEM_SET_AUTOMATIC_DISTANCE(Hash doorHash, float distance, BOOL requestDoor, BOOL forceUpdate)
Hash
0x9BA001CB45CBF627

Open in the interactive natives reference