Prevent first person weapon lowering (idle, after running/sprinting)

I’m trying to prevent my player’s weapon from idling when in first person.
Weapons get lowered automatically after a few seconds of no activity, or after running/sprinting.

To be clear, I don’t want to force aiming, I want to prevent the weapon from being lowered.
In a CQB setting having to click the fire button twice because of a lowered weapon is not desirable but I can’t figure out which flag to set, or which function to call to prevent this.

Thanks!

SetPedMovementClipset with the right clipset will do that for you. And no, I don’t know what clipset you need, do your own research.

Thank you for your response.

I tried checking if the clipset changes using GetPedMovementClipset(PlayerPedId()) by showing the hash on screen (every tick), but the hash doesn’t change between a “lowered” state and a “shoot-ready state”.

Shouldn’t that hash update when the weapon gets lowered after a few seconds (or running/sprinting)?

Look at the config flag 200 here as well, may be worth setting - might not be a clipset after all. I’ve definitely seen discussions regarding this before though.

I tried setting it on each tick both true and false, unfortunately neither seemed to make any difference.

I found a mod on gta5-mods.com that claims to have solved that issue: Improved First Person Combat - GTA5-Mods.com

-Removes the auto lowering of weapons while being idle a few seconds, and after rolling/sprinting.

But it’s a compiled .asi script, and I have no idea how to contact the author to see if I can get some insights, but this tells me it can be done using natives?

I tried a workaround as well, to trigger the aim control after running/sprinting and every 1 second of no movement manually using SetControlNormal - FiveM Natives @ Cfx.re Docs, but that doesn’t do the trick and even introduces a whole new can of issues.

I’ve tried several of these, both on each tick and at the start of the script but it doesn’t seem to change anything. Usage:

aimHash = GetHashKey("FirstPersonAiming");
SetWeaponAnimationOverride(PlayerPedId(), aimHash);