Laser Sight

10€

Add laser sights to your guns ! Network synced !


✅ Draw laser from gun to aimed point
✅ Customizable color (Normal, Night Vision, Thermal Vision)
✅ Customizable control (Uses RegisterKeyMapping)
✅ Network sync (Uses StateBags, not heavy on the network at all)
✅ Blacklist weapons
✅ Customizable offset of the laser relative to the weapon (all weapons are already pre-configured)
✅ Option to have the laser available only when a flashlight is mounted onto the weapon (through GiveWeaponComponentToPed)
⚠️ Uses FiveM Asset Escrow system
⚠️ Requires OneSync (Not working with OneSync Legacy)
⚠️ Uses around 0.1ms per laser, so we implemented a limit to the number of lasers drawn

1.2.6

✅ Update whitelist to latest ESX


1.2.5

✅ Option to sync the true aimed point accross the network (heavier)


1.2.4

✅ Fix laser color when using night vision / thermal


1.2.3

✅ Add job grade permission support
✅ Customize the range of the laser
✅ Customize the color of the laser in the command line : `/laser_color r g b a`


1.2.2

✅ Disable laser if the player switches weapon


1.2.1b

✅ Add ACE permission support


1.2.1a

✅ Bugfix whitelist


1.2.1

✅ Whitelist option, comes preconfigured for ESX but can be modified
✅ Option to disable the laser while inside any vehicle (default to `true`)


1.2.0

✅ Option to have the laser available only when a flashlight is mounted onto the weapon (through `GiveWeaponComponentToPed`)


1.1.3

✅ Bugfix laser not working


1.1.2

✅ Debug option (to help the support)


1.1.1

✅ Add version check


1.1.0

✅ Network sync v2 (Uses `StateBags` now, even less heavy on the client)


1.0.0

✅ Draw laser from gun to aimed point
✅ Customizable color (Normal, Night Vision, Thermal Vision)
✅ Customizable control (Uses `RegisterKeyMapping`)
✅ Network sync (Uses `DecorRegister`, not heavy on the network at all)
✅ Blacklist weapons
✅ Customize offset of the laser relative to the weapon (all weapons are already pre-configured)


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
GActivate or deactivate the laser
/laser_color *r* *g* *b* *a*Customize the color of the laser
/laser_colorReset the color of the laser
5
  • 3
  • 0
  • 0
  • 0
  • 0
  • ɥsoſ

    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.

  • ! Crack

    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

  • jxck

    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.