Releasing updated version of this script which allows you to adjust and control weapons on your server. It is all-in-one resource regarding weapons and about to get more updates.
Features
Flashlights can stay toggled on while the weapon is in hand or on holster (as long as the prop exists)
Immersive in-game weapon recoil diversifying throughout FIRST or THIRD person.
– You can set recoil values for each weapon or weapon group first or third person respectively
– You can hook your own logic for editing recoil from other script, example if someonee is a police, you can hook a lower recoil modified from other players!
Vehicle module, that will subsitute best recoil scripts available
– You can choose whether you want driver or all vehicle seats to be forced in first person WHILE shooting with corrected return to their respective camera modes (will return back to TP whenever players tops shooting)
– You can enable / disable this module
Compatibility with native game functionality such as grips and other attachments altering the recoil
Fire modes is a module, that will enable players choosing between single / auto fire modes
– The module also contains safety that will enable saftey on the weapon, preventing it to shoot with a chance of failing
Rag shooting will allow players to shoot when they are in fall state
FAQ + things I forgot to mention in the video
Q: Does state of weapon remain when dropped from inventory… ?
A: As ox_inventory is a dependency and it uses metadata, yes it does save with the weapon. You will pick up the same weapon state as it was dropped it
Q: What’s the vehicle module in detail?
A: Vehicle module allows you to force vehicle seats occupants to be forced into first person. It will cache the view before, meaning they will return to their original view after shooting. It will also apply custom recoil function in the vehicle as GTA does not handle in-vehicle recoil in any way.
Q: Do attachments have any recoil reduction?
A: Yes, they do. Slightly, but after variety of testings it was reported that attachments do lower / alter recoil strength.
Good catch. It was configurable whether the static camera shake is or isn’t enabled, the amplitude was not. However now it has been added as of now.
If by shake you meant recoil knockback, it is fully configurable for each weapon or weapon group.
Example you can have default weapon type recoil of 20% and override for each pistol separately. Single weapon recoil will have priority over weapon group. Think of it as fallback values. If for example WEAPON_PISTOL50 is not configured, but you have pistol group configured, it will use group values instead.
Unfortunately, it is not in my scope to rewrite this for other inventories at this moment. If demand grows, I might be able to eventually, but I shift my focus to other projects for a bit