GetVehicleDoorAngleRatio
Docslocal retval = GetVehicleDoorAngleRatio(vehicle, doorIndex)Description
Checks the angle of the door mapped from 0.0 - 1.0 where 0.0 is fully closed and 1.0 is fully open.
See eDoorId declared in <code>SET_VEHICLE_DOOR_SHUT</code>
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | Vehicle |
doorIndex | int | Index of door to check |
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
floatReturns a floating-point number.
Examples
Official
local veh = GetVehiclePedIsIn(PlayerPedId()
-- check if driver door is open
if GetVehicleDoorAngleRatio(veh, 0) > 0.0 then
print("Driver door is open!)
end