DoorLogic
The DoorLogic
export provides advanced control over vehicle door locking and unlocking mechanics. This system includes various optional parameters to customize animations, notifications, sounds, and other effects.
How to Use
To apply door logic to a vehicle, use the following code:
Example Parameters:
vehicle
: The targeted vehicle entity.skipAnimation
: (Optional, defaultfalse
) Skips the lock/unlock animation iftrue
.forcedDoorStatus
: (Optional) Forces the door status (0
for None,1
for Unlocked,2
for Locked).skipNotification
: (Optional, defaultfalse
) Prevents notifications from being displayed.skipSound
: (Optional, defaultfalse
) Prevents the default vehicle door sounds.skipFlickerLights
: (Optional, defaultfalse
) Prevents lights from flickering when toggling the lock state.
Example Usage
This example demonstrates applying DoorLogic
to the closest vehicle:
This export allows flexible control over vehicle door states, enabling customized interaction within your scripts.
Last updated