qb-smallresources
qb-smallresources copied to clipboard
[FIX] Gun draw glitch
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.
if you experience a lag when equiping a gun while running, in the means of:
- You run with a gun
- you start switching
- You lag between the switch
It's because of TaskPlayAnimAdvanced on 241, either disable it by typing -- next to it, or try something else.
after: https://s1.ezgif.com/tmp/ezgif-1-1268f725cd.gif
before: https://s1.ezgif.com/tmp/ezgif-1-59565728b9.gif
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.
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
I apologize for the late reply DarkPeluxin Find the weapdraw.lua if you are using the old qb-core it is under qb-smallresources and if you are using the new qb-core it is under the qb-weapons. Look for anywhere that you find the following
TaskPlayAnimAdvanced(ped, 'rcmjosh4', 'josh_leadout_cop2', pos.x, pos.y, pos.z, 0, 0, rot, 3.0, 3.0, -1, 50, 0, 0, 0) Wait(300)
Comment them out by doing this
--TaskPlayAnimAdvanced(ped, 'rcmjosh4', 'josh_leadout_cop2', pos.x, pos.y, pos.z, 0, 0, rot, 3.0, 3.0, -1, 50, 0, 0, 0) --Wait(300)
If you do that at every single location your character will put their hand to their hip and then their gun will go to their hand. It removes that FULL animation which prevents it from lagging and then failing to complete
This issue has had 60 days of inactivity & will close within 7 days