SetVehicleDoorShut
DocsSetVehicleDoorShut(vehicle, doorIndex, closeInstantly)Description
Sets the specified door index shut on the passed vehicle.
enum eDoorId
{
VEH_EXT_DOOR_DSIDE_F = 0,
VEH_EXT_DOOR_DSIDE_R = 1,
VEH_EXT_DOOR_PSIDE_F = 2,
VEH_EXT_DOOR_PSIDE_R = 3,
VEH_EXT_BONNET = 4,
VEH_EXT_BOOT = 5,
// 0x872E72B8 = 0xFFFFFFFF,
}Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | Vehicle. |
doorIndex | int | Index of the door you want to close. |
closeInstantly | BOOL | Whether the doors close instantly. |
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
voidThis native does not return a value.
Examples
Official
local Vehicle = GetVehiclePedIsUsing(PlayerPedId())
for i = 0, 5 do
SetVehicleDoorShut(Vehicle, i, false) -- will close all doors from 0-5
end