qbcore-framework / qb-smallresources

A compilation of small resources combined into one
GNU General Public License v3.0
51 stars 346 forks source link

Melee weapons fix #383

Closed AnishBplayz closed 9 months ago

AnishBplayz commented 1 year ago

So there was an error with my previous PR and I didn't notice but with the pistol whipping being removed the native also removes the ability for player not being able to use melee weapons so including fixing this and to make sure the code works as required i also added an else check for optimization

GhzGarage commented 1 year ago

I noticed your edit for optimization calls the PlayerPedId() three times instead of calling it once and just refreshing the variable

AnishBplayz commented 1 year ago

@GhzGarage I localised the PlayerPedId() Variable now... shouldn't be an issue now

GhzGarage commented 1 year ago

You put it outside the loop

AnishBplayz commented 1 year ago

It is outside the loop and i have tested it myself and see the resmon doesn't spike when the ped is unarmed... @GhzGarage

github-actions[bot] commented 10 months ago

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