Configuration
Explore and fine-tune your settings effortlessly. Customize your script experience according to your preferences
Configuration File
-- 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
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.
Last updated