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

firingmodes
burst
single
full-auto

#21

Appreciate the effort


#22

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


#23

Yeah I have fixed it.

[Edit:]

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


#24

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


#25

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: https://github.com/TomGrobbe/Firing-Modes/blob/master/LICENSE


#26

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


#27

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?


#28

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.


#29

Nice work loks cool thanks for sharing


#30

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.


#31

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


#32

Just change the static variable for safety to true


#33

Thats work for esx server?


#34

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


#36

Update

A small update was just released. Click here to download it: https://github.com/TomGrobbe/Firing-Modes/releases

Changes

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.

#37

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)


#38

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.


#39

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


#40

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)


#41

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