Using this resource

Configuration:

main = {
    -- Set damageLevel to 100.0 to activate airbags when the vehicle is no longer drivable
    -- This is recommended to stay between 700 - 999.0
    -- Vehicles start at 1000.0 damage level - then gradually reduce
    damageLevel = 600.0,
    -- This is the amount of seconds before the airbags automatically disappear - the /airbag command one does not disappear
    -- If you set this to -1, all airbags will stay forever, even when the vehicle is deleted (so I recommend making these expire)
    secondsToExpire = 50,
    modelName = `prop_car_airbag`,
    exemptVehicleClasses = {8, 16, 15, 13},
    exemptVehicleModels = {`police`, `police2`},
    airbagSoundVolume = 0.1,
}

To change the level of damage to detect, for an automatic deployment increase or decrease following config setting.

main = {
    -- Set damageLevel to 100.0 to activate airbags when the vehicle is no longer drivable
    -- This is recommended to stay between 700 - 999.0
    -- Vehicles start at 1000.0 damage level - then gradually reduce
    damageLevel = 600.0, -- Increase or decrease this amount

To change the number of seconds after airbags are automatically deployed before deleting and to change the exempted vehicles, change following config settings

 -- This is the amount of seconds before the airbags automatically disappear - the /airbag command one does not disappear
    -- If you set this to -1, all airbags will stay forever, even when the vehicle is deleted (so I recommend making these expire)
    secondsToExpire = 50, -- increase or decrease this number
    modelName = `prop_car_airbag`,
    exemptVehicleClasses = {8, 16, 15, 13},
    exemptVehicleModels = {`police`, `police2`}, -- add your car models here 
    airbagSoundVolume = 0.1,
}

Usage

The airbags are automatically deployed on a vehicle, they can also be manually activated using the command below:

/airbag - This will activate airbags on your current vehicle, you must be the driver.

All airbags except ones activated manually will disappear after 50 seconds by normal or when the vehicle is deleted, the delay can be configured in the config file easily.

Last updated