You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you are playing a custom weapon style animation it will fire twice in quick succession but if you arent using any custom weapon style it works fine so i think it has something to do with if you are playing an animation and also firing a weapon
Framework
ESX Legacy
Resource version
2.43.4
To Reproduce
RegisterCommand("hillbilly", function()
SetWeaponAnimationOverride(cache.ped, GetHashKey("Hillbilly"))
Citizen.CreateThread(function()
while true do
local dict, anim = "combat@aim_variations@1h@hillbilly", "aim_variation_a"
if IsPedArmed(cache.ped, 4) then
while not HasAnimDictLoaded(dict) do
Wait(25)
RequestAnimDict(dict)
end
local _,hash = GetCurrentPedWeapon(cache.ped, 1)
if IsPlayerFreeAiming(PlayerId()) or (IsControlPressed(0, 24) and GetAmmoInClip(cache.ped, hash) > 0) then
if not IsEntityPlayingAnim(cache.ped, dict, anim, 3) then
TaskPlayAnim(cache.ped, dict, anim, 8.0 ,-8.0, -1, 49, 0, 0, 0, 0)
end
elseif IsEntityPlayingAnim(cache.ped, dict, anim, 3) then
ClearPedTasks(cache.ped)
end
end
Citizen.Wait(200)
end
end)
end)
Describe the bug
If you are playing a custom weapon style animation it will fire twice in quick succession but if you arent using any custom weapon style it works fine so i think it has something to do with if you are playing an animation and also firing a weapon
Framework
ESX Legacy
Resource version
2.43.4
To Reproduce
Expected behavior
For it to only shoot once
Screenshots
Video of issue
The text was updated successfully, but these errors were encountered: