[Request] Handcuff Animation

I’ve seen this really nice handcuff animation and I’m wondering if anyone knows where it is from. Heres a link: Twitch

-- Police officer arresting animation with only upper body
local playerPed = PlayerPedId()

local animation = {dict = 'mp_arrest_paired', name = 'cop_p2_back_right'}

RequestAnimDict(animation.dict)
while not HasAnimDictLoaded(animation.dict) do
    Wait(0)
end
TaskPlayAnim(playerPed, 'mp_arrest_paired', 'cop_p2_back_right', 8.0, -8,3750, 48, 0, 0, 0, 0)


-- Client arrested animation
local playerPed = PlayerPedId()

local animation = { dict = "mp_arresting", name = "idle" }

RequestAnimDict(animation.dict)
while not HasAnimDictLoaded(animation.dict) do
    Wait(0)
end

TaskPlayAnim(playerPed, 'mp_arresting', 'b_uncuff', 8.0, -8, -1, 0, 0, 0, 0, 0)

Thanks, I am using sem’s interaction menu and this is the arrest section of the cuff animation,

So do I just replace this or?

No that’s the client getting arrested portion. I’m not sure how “sem’s interaction” works I would suggest reaching out to whomever made it for assistants.

alright, thank the code mate

@AidanDaDoolphin Fixed :+1:

playerPed = GetPlayerPed(-1)
	SetCurrentPedWeapon(playerPed, GetHashKey('WEAPON_UNARMED'), true) -- unarm player
	local x, y, z   = table.unpack(playercoords + playerlocation * 1.0)
	SetEntityCoords(GetPlayerPed(-1), x, y, z)
	SetEntityHeading(GetPlayerPed(-1), playerheading)
	Citizen.Wait(250)
	loadanimdict('mp_arrest_paired')
	TaskPlayAnim(GetPlayerPed(-1), 'mp_arrest_paired', 'crook_p2_back_right', 8.0, -8, 3750 , 2, 0, 0, 0, 0)
	Citizen.Wait(3760)
	IsHandcuffed = true
	loadanimdict('mp_arresting')
	TaskPlayAnim(GetPlayerPed(-1), 'mp_arresting', 'idle', 8.0, -8, -1, 49, 0.0, false, false, false)
2 Likes

Hey where do I put it here
local isCuffed = false
RegisterNetEvent(‘SEM_InteractionMenu:Cuff’)
AddEventHandler(‘SEM_InteractionMenu:Cuff’, function()
local Ped = PlayerPedId()
if (DoesEntityExist(Ped)) then
Citizen.CreateThread(function()
RequestAnimDict(‘mp_arresting’)
while not HasAnimDictLoaded(‘mp_arresting’) do
Citizen.Wait(0)
end

        if isCuffed then
            isCuffed = false
            Citizen.Wait(500)
            SetEnableHandcuffs(Ped, false)
            ClearPedTasksImmediately(Ped)
        else
            isCuffed = true
			SetEnableHandcuffs(Ped, true)
			TaskPlayAnim(Ped, 'mp_arresting', 'idle', 8.0, -8, -1, 49, 0, 0, 0, 0)
        end
	end)
end

end)

Or here
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)

    if isCuffed then
        if not IsEntityPlayingAnim(GetPlayerPed(PlayerId()), 'mp_arresting', 'idle', 3) then
            TaskPlayAnim(GetPlayerPed(PlayerId()), 'mp_arresting', 'idle', 8.0, -8, -1, 49, 0, 0, 0, 0)
        end

        SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
        
        if not Config.VehEnterCuffed then
            DisableControlAction(1, 23, true) --F | Enter Vehicle
            DisableControlAction(1, 75, true) --F | Exit Vehicle
        end
		DisableControlAction(1, 140, true) --R
		DisableControlAction(1, 141, true) --Q
		DisableControlAction(1, 142, true) --LMB
		SetPedPathCanUseLadders(GetPlayerPed(PlayerId()), false)
		if IsPedInAnyVehicle(GetPlayerPed(PlayerId()), false) then
			DisableControlAction(0, 59, true) --Vehicle Driving
		end
	end
end

end)

Hey Aidan, do you ever figured this out or anyone other here how to use these kind of Animation in SEM Menu?