> For the complete documentation index, see [llms.txt](https://fivem.lvsoft.com.ar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivem.lvsoft.com.ar/standalone/lvs-accident/configuration.md).

# Configuration

## Configuration File

```lua
-- Note: Update v1.7
-- Due some vehicles are extremely strong than other, the script is based on the damage received and
-- the deceleration of the vehicle to calculate the accident.
-- Accident take effect when 'damage' or 'deceleration' it is greater than those set here in the config
-- increases 'damage' and 'deceleration' at each level

Config = {}
Config.Debug = false -- Use only for testing purpose
Config.UseBaseEvents = false -- If you have base events improve performance

-- The crash effect works according to the damage a vehicle receives, there are 5 levels according to it, you can create more if you wish
-- The blacking out effect is due to the speed deceleration, if the vehicle decelerates rapidly by the threshold you set, the player blacks out
Config.Levels = { -- effects levels
	[1] = {
		damage = 30, 		-- Vehicle damage
		deceleration = 50, 	-- Vehicle deceleration (KMH)
		time = 6, 		-- Effect time in seconds
	},
	[2] = {
		damage = 40, 		-- Vehicle damage
		deceleration = 70, 	-- Vehicle deceleration (KMH)
		time = 12, 		-- Effect time in seconds
	},
	[3] = {
		damage = 60, 		-- Vehicle damage
		deceleration = 90, 	-- Vehicle deceleration (KMH)
		time = 20, 		-- Effect time in seconds
		blackout = { 		-- Blackout effect is base on deceleration
			enabled = true,	-- Enable/Disable
			speedThreshold = 110, 	-- Speed in KMH
			time = 6				-- Time in seconds
		},
	},
	[4] = {
		damage = 80,
		deceleration = 120,
		time = 25,
		blackout = {
			enabled = true,
			speedThreshold = 120,
			time = 10
		},
	},
	[5] = {
		damage = 100,
		deceleration = 150,
		time = 30,
		blackout = {
			enabled = true,
			speedThreshold = 150,
			time = 12
		},
	}
}

-- Enable the disabling of controls if the player is blacked out
Config.DisableControlsOnBlackout = true -- Disable controls when blackout is active ?
Config.MessageOnBlackout = 'Estas inconsciente por el accidente'

-- Multiplier of screen shaking strength
Config.ScreenShakeMultiplier = 0.1

-- Disable the effects on some classes or vehicle individually
--[[
Vehicle Classes:
0: Compacts     1: Sedans       2: SUVs         3: Coupes       4: Muscle       5: Sports Classics
6: Sports       7: Super        8: Motorcycles  9: Off-road     10: Industrial  11: Utility
12: Vans        13: Cycles      14: Boats       15: Helicopters 16: Planes      17: Service
18: Emergency   19: Military    20: Commercial  21: Trains
--]]
Config.IgnoreVehicleClass = {8, 13, 14, 15, 16} -- disable the script for this vehicle class
Config.IgnoreVehicle = {'some_model'} -- disable the script for this vehicles

-- Notification function, modify according to your needs
Config.Notify = function(text, type, time)
	exports['lv-player']:Alert('Accidente', text, type, time)
end

```

{% hint style="warning" %}
`Config.Notify` is only for displaying a message when the character is unconscious. If you use native functions, it won't be visible because the screen goes black. You should use some notification/alert system with UI to make it visible above the black screen.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fivem.lvsoft.com.ar/standalone/lvs-accident/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
