qbcore-framework / qb-weapons

Weapon Logic Script For QB-Core :gun:
GNU General Public License v3.0
28 stars 191 forks source link

Crouching instant reloading the gun #188

Closed sam1475 closed 2 weeks ago

sam1475 commented 4 months ago

Describe the bug Crouching instant reloading the gun. Spam R and Crouch to autofire a one round gun.

To Reproduce Steps to reproduce the behavior:

  1. Press R
  2. Crouch
  3. Fire
  4. Repeat

Expected behavior Cancels the reload with the anim cancel or reloads still Screenshots

If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

Additional context Add any other context about the problem here.

MilyonJames commented 2 months ago

This can be fixed by adding not IsPedReloading(ped) to qb-smallresources/client/crouchphone.lua#L35 This would look like that:

if not IsPedSittingInAnyVehicle(ped) and not IsPedFalling(ped) and not IsPedSwimming(ped) and not IsPedSwimmingUnderWater(ped) and not IsPauseMenuActive() and not IsPedReloading(ped) then

I guess this issue should be posted to qb-smallresources.

github-actions[bot] commented 4 weeks ago

This issue has had 60 days of inactivity & will close within 7 days