GetVehicleDoorLockStatus
Docslocal retval = GetVehicleDoorLockStatus(vehicle)Description
enum_VehicleLockStatus = {
None = 0,
Locked = 2,
LockedForPlayer = 3,
StickPlayerInside = 4, -- Doesn't allow players to exit the vehicle with the exit vehicle key.
CanBeBrokenInto = 7, -- Can be broken into the car. If the glass is broken, the value will be set to 1
CanBeBrokenIntoPersist = 8, -- Can be broken into persist
CannotBeTriedToEnter = 10, -- Cannot be tried to enter (Nothing happens when you press the vehicle enter key).
}It should be noted that while the client-side command and its
setter distinguish between states 0 (unset) and 1 (unlocked), the game will synchronize both as state 0, so the server-side
command will return only '0' if unlocked.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | A vehicle handle. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
intReturns an integer value.