qbcore-framework / qb-smallresources

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

[FIX] Gun draw glitch #462

Open DemonLawyerr opened 2 months ago

DemonLawyerr commented 2 months ago

Is your feature request related to a problem? Please describe. So, everytime you have a weapon equiped and try to equip a new one, you get into the animation but don't get the weapon out.

Describe the feature you'd like Fix the line in the code, you just need to repalce SetCurrentPedWeapon(ped, 'weapon_unarmed', true) in line 240, between the 2 animations, with SetCurrentPedWeapon(ped, newWeap, true)

Additional context I was furious that the resource was bugged and i couldnt equip my gun, this is a simple and fast solution. But can be altered, i just don't know how to code, i played with the code until it worked.

DemonLawyerr commented 2 months ago

if you experience a lag when equiping a gun while running, in the means of:

  1. You run with a gun
  2. you start switching
  3. You lag between the switch

It's because of TaskPlayAnimAdvanced on 241, either disable it by typing -- next to it, or try something else.

DemonLawyerr commented 2 months ago

after: https://s1.ezgif.com/tmp/ezgif-1-1268f725cd.gif

before: https://s1.ezgif.com/tmp/ezgif-1-59565728b9.gif

mfel2k commented 2 months ago

I did that to all locations that had that had the unarmed task and taskplayanim and now there is seamless transition from 1 gun to the next. You can run and just switch guns like nothing, no more glitch. Thanks for this.

DarkPeluxin commented 2 weeks ago

I did that to all locations that had that had the unarmed task and taskplayanim and now there is seamless transition from 1 gun to the next. You can run and just switch guns like nothing, no more glitch. Thanks for this.

Can you show me how? I commented out all the taskplayanim and now the animation is cut off