Okay guys I've gotta fix this [Devs]

Does anybody know if the pistol whip animation/action when pressing R for reload is a native hash or has a name value, as I have been wanting to disable it for a while or is it built into the games raw code.

This disables pistol whipping [Release] WeaponDrop

I made a no pistol whip script a while back, never released though, let me find it.

Oh thanks, it has been irritating me for so long, I will just remove the other code, only need the no pistol whipping.,

This may work, not tested tho.

if IsEntityPlayingAnim(PlayerPedId(), 'melee@pistol@streamed_core', 'pistol_aim_whip', 3) or 
   IsEntityPlayingAnim(PlayerPedId(), 'melee@pistol@streamed_core', 'pistol_idle_whip', 3) or 
   IsEntityPlayingAnim(PlayerPedId(), 'melee@pistol@streamed_fps', 'pistol_aim_whip', 3) or 
   IsEntityPlayingAnim(PlayerPedId(), 'melee@pistol@streamed_fps', 'pistol_idle_whip', 3) then
	StopEntityAnim(PlayerPedId(), 'melee@pistol@streamed_core', 'pistol_aim_whip', )
	StopEntityAnim(PlayerPedId(), 'melee@pistol@streamed_core', 'pistol_idle_whip', )
	StopEntityAnim(PlayerPedId(), 'melee@pistol@streamed_fps', 'pistol_aim_whip', )
	StopEntityAnim(PlayerPedId(), 'melee@pistol@streamed_fps', 'pistol_idle_whip', )
end
2 Likes
local targetDistance
local rayHandle, targeted, targetedCoords, surfaceNormal, targetedEntity


function headsUp(text)
	SetTextComponentFormat('STRING')
	AddTextComponentString(text)
	DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end

Citizen.CreateThread(function ()
    local targetPed
    local playerPed


    while true do
        playerPed = PlayerPedId()
        targetPed = targetedEntity

		if IsPedArmed(playerPed, 6) then
		    DisableControlAction(1, 140, true)
		    DisableControlAction(1, 141, true)
		    DisableControlAction(1, 142, true)
		    DisableControlAction(1, 263, true)
		    DisableControlAction(1, 264, true)
	    end

        if targeted then
            headsUp('~INPUT_CONTEXT~ to punch this asshole.')

            if IsControlJustPressed(1, 38) then
                ClearPedTasks(targetPed)
                SetPedToRagdollWithFall(
                    targetPed, 1500, 2000, 0, GetEntityForwardVector(playerPed), 
                    1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
                )

                -- Wait(500)

                SetEntityHealth(targetPed, 0)
            end
        end

        Wait(0)
    end
end)


Citizen.CreateThread(function ()
	local playerPed
	local playerCoords

    while true do
		playerPed = PlayerPedId()
        playerCoords = GetEntityCoords(playerPed)
        rayHandle, targeted, targetedCoords, surfaceNormal, targetedEntity = GetShapeTestResult(StartShapeTestCapsule(
            playerCoords.x, playerCoords.y, playerCoords.z,
            playerCoords.x, playerCoords.y, playerCoords.z,
        	2.0,
        	8, playerPed, 7
        ))

        if targeted then
            if targeted == 0 or not IsEntityAPed(targetedEntity) or IsEntityDead(targetedEntity) or IsPedRagdoll(targetedEntity) then
                targeted = nil
                targetedEntity = 0
            else
                targetedCoords = GetEntityCoords(targetedEntity)
                targetDistance = GetDistanceBetweenCoords(playerCoords, targetedCoords)
            end
        end

        Wait(100)        
    end
end)