Firing Modes (Single shot / Burst mode / Full auto & Safety toggle)



Appreciate the effort


Well I have fixed compiling issues, lets see if this works.


Yeah I have fixed it.


I’m just adding the other weapons as there isn’t a safety on all the rifles.


@Vespura Do I have your permission to release my modified version of this?


If you take a look at the license in my project files you’ll know exactly what you can and cannot do.
In summary:

  • You are allowed to release a modified version of this, but only under the following conditions:
  • You must use the same license
  • You must make the source code available to everyone
  • You have to disclose the original source and credits
  • You must state all changes made

For more info about the license, look here:


Here you go mate - [Release] Single Shot Fire Mode & Safety Feature


Any plans to make it so that certain weapons are default set to single shot or full auto for a whole server and they can’t change it?


That means a LOT of configuration needs to be done by the user, and considering that in that case a lot of people will start complaining because the script is too complex for them to setup, it’ll be easier if you fork my GitHub repository and modify it in the cs files and recompile it.


Nice work loks cool thanks for sharing


Amazing! Possibly make it to where players are forced to use Single or Burst for some weapons, that would be great :). Keep up the amazing work by far my favorite FiveM Developer.


Is there an option to set it so the safety catch to safe by default, versus the current fire?


Just change the static variable for safety to true


Thats work for esx server?


There’s no such thing as “esx server”… This works for FXServer, both with or without any framework (like esx).



A small update was just released. Click here to download it:


There are now 3 new options available to change in the __resource.lua file.

  1. disableIcons 'false'
    Change this to ‘true’ if you want to hide/disable the icon in the top right corner of your screen.
  2. safetyToggleKey '7'
    Change the '7' to any valid control id if you want to change the “Toggle Safety Mode” button.
  3. switchFiringModeKey '311'
    Change the '311' to any valid control id if you want to change the “Switch Firing Mode” button.


Is there any way to make this more compatible with controller? Many times, you have to press the fire button a few times for it to recognize (singlefire mode, etc)


If you press the button on the keyboard, while still using the controller at the same time, then the keyboard press won’t be recognized. You have to stop using the controller and only use the keyboard if you want to use the controls.

The reason I disabled this for now, is because K and L are mapped to buttons that would conflict on the controller, like Right Stick (Cinematic camera slow motion toggle) for the L key for example.

I can make it so there’s different controls for keyboard and controller, however. The controller is pretty much packed with a ton of features already. It’d be really hard to find an unused button on the controller for 2 new features…

But, it’s still possible and I might add it one day.


Feature request : To force a mode on players. Eg: Force all to use Burst mode and they cant change it…?


Feature request: A config file where we can do the above mentioned by FAXES, and also set the standard firing mode so they do not start as stock (for example, by default a carbine rifle is set to automatic, but with the config file, you’d be able to change it to semi-auto by default)


How can i modify the language of the script ?
I’m new in programming :slight_smile: