Deployable Emergency Vehicle Light
Whether it is undercover law enforcement, paramedic services or road-workers, this deployable emergency light will make them noticeable by everyone. Equip any vehicle with either a blue, red or orange emergency light on the spot through this highly configurable, but easily implementable script.
Get it here: gamzkystore.com
Support: Discord
Detailed preview: Youtube
Features
- Works as a standalone script without any dependencies, only if you wish to make use of the item will you need a respective inventory script (esx, qb, ox and others).
- The used light props are included with the files and not encrypted.
- Will automatically work on any vehicle with a roof without any additional configuration (unless the vehicle is blacklisted), so no need to configure individual light positions for each vehicle.
- Special vehicles without for instance a roof, can be manually configured to use a suitable position for the light.
- The used light color (blue, red, orange) can be uniquely configured for different vehicles.
- It is also possible to make the light blink instead of rotate.
- Possibility to also enable a toggleable siren, which can be used when the light is deployed (Custom sirens are supported).
- Light properties, animations, vehicle configurations, sirens and more are configurable.
- Fully synchronized between players and optimized to run smoothly even when multiple lights are simultaneously deployed (only nearby vehicle lights are displayed).
Resmon: Idle: 0.00ms - Active on 1 vehicle: 0.07ms - Active on 10 close-by vehicles: 0.13ms
How it works
- Deploy light: Simply use the item or command whenever driving a vehicle which is not blacklisted in the configuration, to deploy the emergency light.
- Light deployed: A default light configuration is used, which automatically finds a suitable position for the light on the roof. So no need to configure all vehicles individually. It is still possible to uniquely configure specific vehicles, to use a different place-animation, light-color, light-position, sirens etc.
- Toggle Siren: With the light deployed, you can also use a siren through L-SHIFT (also configurable and can be disabled).
- Removing light: The light can be removed again, by using the command or L-CRTL (also configurable).
Core/framework related functions are fully accessible in the encrypted version, feel free to create a support ticket in our Discord in case of questions.
Config
Config = {}
-- If set to true, only the light closest to the player will fully display. Any additional lights from vehicles further away will be optimized to reduce performance impact
-- In general, you can leave this off as the script is already optimized well, but if you expect 10+ vehicles in a compact area to be using the light simultaneously you could consider turning this on for a slightly better (ms) run-time
Config.OptimizeMode = false
-- The speed multiplier for the light rotation, larger value means faster rotation
Config.LightRotationSpeedMultiplier = 1.15
-- The required item to deploy a light, this can only be used if you have an inventory system to handle items
Config.RequiredItem = {
Enabled = false,
Name = 'deployable_light'
}
-- Enable the command to toggle light on a vehicle (command = \light), you can use this if you do not have an inventory system to handle items
Config.EnableLightCommand = true
-- The key which you can use to remove a light from the vehicle
Config.RemoveLightKey = 36 -- L-CTRL
-- If you also want an optional siren to be usable with the deployable light, set Enabled to true
Config.Siren = {
Enabled = true,
Key = 21, -- L-SHIFT
}
-- The blacklist for classes and models which cannot use the light
Config.Blacklist = {
['classes'] = { 8, 13, 14, 15, 16, 21, 22 },
['models'] = { `adder` }
}
-- The settings corresponding to the light effect
Config.LightSettings = {
['red'] = {
LightPropHash = `hei_prop_wall_alarm_red`, -- Prop of the light
RGB = vector3(255, 0, 0), -- RGB color of the light
Distance = 12.0, -- The maximum distance the light can reach
Brightness = 5.0, -- The brightness of the light
Roundness = 2.0, -- "smoothness" of the circle edge
Radius = 60.0, -- The radius size of the light
Falloff = 3.0, -- The falloff size of the light's edge
},
['blue'] = {
LightPropHash = `hei_prop_wall_alarm_blue`,
RGB = vector3(0, 0, 255),
Distance = 12.0,
Brightness = 5.0,
Roundness = 2.0,
Radius = 60.0,
Falloff = 3.0,
},
['orange'] = {
LightPropHash = `hei_prop_wall_alarm_orange`,
RGB = vector3(242, 87, 10),
Distance = 12.0,
Brightness = 5.0,
Roundness = 2.0,
Radius = 60.0,
Falloff = 3.0,
}
}
-- The defined animations applied when attaching/detaching the light
Config.Animation = {
['default'] = {
Dict = 'veh@drivebystd_ds_grenades',
Name = 'throw_180r',
AnimTime = 500,
AttachBoneId = 18905, -- Left hand
HandPosition = vector3(0.1, 0.0, 0.1),
HandRotation = vector3(90.0, 0.0, 0.0),
},
['front_window'] = {
Dict = 'veh@van@ds@base',
Name = 'change_station',
AnimTime = 1500,
AttachBoneId = 57005, -- Right hand
HandPosition = vector3(0.1, 0.0, -0.05),
HandRotation = vector3(180.0, 0.0, 0.0),
},
['quad'] = {
Dict = 'veh@bike@quad@front@base',
Name = 'change_station',
AnimTime = 1500,
AttachBoneId = 57005, -- Right hand
HandPosition = vector3(0.1, 0.05, 0.0),
HandRotation = vector3(-90.0, 0.0, 0.0),
},
}
-- The attachment information for the light, default is always used unless specified otherwise.
-- Position: Defines the light-prop coordinates w.r.t. the center of the vehicle. Leave at vector3(0.0, 0.0, 0.0) and the script will automatically try to estimate a good position.
-- Rotation: Defines the light-prop rotation.
-- Animation: The animation to play when attaching/detaching the light.
-- LightSetting: The light setting to use for the light.
-- SirenName: The siren name that can be used when the light is enabled, only works if Config.Siren.Enabled is set to true. If SirenName is not defined, the siren cannot be used for that vehicle.
Config.VehicleData = {
['default'] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-95.0, -5.0, 0.0), Animation = 'default', LightSetting = 'red', SirenName = 'VEHICLES_HORNS_SIREN_1' },
[`baller`] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-90.0, -5.0, 0.0), Animation = 'default', LightSetting = 'blue', SirenName = 'VEHICLES_HORNS_SIREN_1' },
[`blazer2`] = { Position = vector3(0.0, 0.15, 0.4), Rotation = vector3(-90.0, -0.0, 0.0), Animation = 'quad', LightSetting = 'red', SirenName = 'VEHICLES_HORNS_SIREN_2' },
[`burrito4`] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-95.0, -5.0, 0.0), Animation = 'default', LightSetting = 'orange' },
[`zorrusso`] = { Position = vector3(0.3, 0.9, 0.29), Rotation = vector3(-90.0, 0.0, 0.0), Animation = 'front_window', LightSetting = 'blue' },
-- You can add more unique vehicle settings here if you wish, the key should be the vehicle model hash
}
Code is accessible | No, but there is an unencrypted version |
Subscription-based | No |
Lines (approximately) | 714 |
Requirements | None |
Support | Yes |