Add laser sights to your guns ! Network synced !
Nabla.LogLevel = Nabla.LogLevels.WARN -- Log levels are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (default is WARN)
Config = {
-- Please check our FAQ if you have any question : https://fivem.nabla.sh/faq
-- List of players who have access to the actions, set WhiteListEnabled = true/false to enable/disable the whitelist
WhiteListEnabled = false,
WhiteList = {
'ip:192.168.168.35',
'steam:12345',
'police',
'police:3', -- Job and grade
'nabla.lasersight', -- To use with ACE, add this to your server.cfg : add_ace identifier.YOURIDENTIFIER nabla.lasersight allow
},
-- Set the color of the lasers here
Color = {
Normal = {R = 255, G = 0, B = 0, A = 255},
NightVision = {R = 220, G = 255, B = 220, A = 255},
ThermalVision = {R = 255, G = 155, B = 35, A = 255},
},
-- Allow user to change the color of their lasers
AllowColorChange = true,
-- Range of the laser sight (for raycast and drawing)
Range = 300.0,
-- Keybinds, you can choose from here : https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/
DefaultControls = function()
RegisterKeyMapping('+taser_toggle', 'Toggle Laser', 'KEYBOARD', 'G')
end,
-- Max number of lasers to be drawn
MaxLasers = 5,
Strings = {
['compat_wpn'] = "This weapon doesn't have a laser",
['disabled'] = "Laser ~r~disabled",
['enabled'] = "Laser ~g~enabled",
},
-- Laser will only be available if you have a flashlight installed on your weapon (through GiveWeaponComponentToPed)
OnlyIfAttachment = false,
-- Disable inside vehicles
DisableVehicle = true,
-- Disable the laser if the player switches weapon
DisableOnSwitch = true,
-- Force the sync based on the true aimed point of the player with the laser
-- Warning : Network heavier, can lead to incorrect orientation between the weapon and the laser
ForceSyncAimedPoint = false,
}
local prev = nil
function ShowNotification(message)
if prev ~= nil then
RemoveNotification(prev)
end
AddTextEntry(GetCurrentResourceName().."Notif", Config.Strings[message])
BeginTextCommandThefeedPost(GetCurrentResourceName().."Notif")
prev = EndTextCommandThefeedPostTicker(false, false)
end
Keybind / Command | Action |
---|---|
G | Activate or deactivate the laser |
/laser_color *r* *g* *b* *a* | Customize the color of the laser |
/laser_color | Reset the color of the laser |
28/11/2022
Like: Love how others can see it and listen to community of my suggestion and added the color option
Dislike: Could be a bit more responsive, seems a bit delayed with mouse movements.
27/11/2022
Like: It works like it should and its awesome,
Dislike: but they need to put like use laserSight as item also so we can sell to people ingame
3/5/2022
Like: The support team rapidly respond to any issues or queries as well as pushing out requested updates extremely fast.
Dislike: Nothing.