_SET_DISABLE_VEHICLE_WINDOW_COLLISIONS
DocsSetDisableVehicleWindowCollisions(vehicle, toggle)Description
R\* used it to "remove" vehicle windows when "nightshark" had some mod, which adding some kind of armored windows. When enabled, you can't break vehicles glass. All your bullets wiil shoot through glass. You also will not able to break the glass with any other way (hitting and etc)
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to toggle this for. |
toggle | BOOL | True disables the collision, false enables the collision |
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 = GetVehiclePedIsIn(PlayerPedId(), false)
if GetEntityModel(vehicle) == `NIGHTSHARK` then
-- Mod index 5 = armored window plates
if GetVehicleMod(vehicle, 5) ~= -1 then
-- The nightshark has armored plates in front of the windows
-- so we disable the window collisions
SetDisableVehicleWindowCollisions(vehicle, true)
else
-- The nightshark has no armored plates in front of the windows
-- so we enable the window collisions
SetDisableVehicleWindowCollisions(vehicle, false)
end
end