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
removalTimer = {
enabled = true, -- This enables / disables the automatic removal of airbags
timer = 10, -- This is the number of seconds until airbags are removed automatically
},
}
Usage
The airbags are automatically deployed on a vehicle, they can also be manually activated using the /airbag command mentioned below.
All airbags activated can be removed automatically on a timer, which is activated above.
If a vehicle is repaired after the airbags are activated, this will automatically remove the airbags.
Commands
/airbag command
airbagsCommand = { -- This allows you to enable / disable the /removeairbags command.
enabled = true,
name = "airbag",
},
This command allows you to deploy an airbag on the current vehicle you are driving. You can setup permissions for this.
/removeairbags command
removeCommand = { -- This allows you to enable / disable the /removeairbags command.
enabled = true,
name = "removeairbags",
},
This command allows you to remove airbags on the current vehicle you are driving. You can setup permissions for this.
Warning Message
This allows you to configure whether an on-screen warning message will appear after airbag activations.
warningMessage = {
enabled = true, -- This enables / disables the airbag warning message
flash = true, -- This determines whether to flash the message
timer = 30, -- This is the number of seconds that the warning message is displayed for
},
Stuck in vehicle
stuckInVehicle = false, -- If true, the player will be stuck inside the vehicle, intended to be used with firetools. Using spreaders will unlock the vehicle
stuckInVehicleChance = 40, -- This is the percentage chance that the player will be stuck inside the vehicle, set this to 100 if you want this to happen every time
You can set whether players have a chance to become stuck in a vehicle after airbag activation. By default, this is turned off and the chance is set to 40%.
This integrates well with our Fire Tools resource, requiring the use of spreaders/cutters to allow them to exit the vehicle.