function WheelAnimation()
	ProgressBar(false, Config.Locale["Wheel"], 7000, "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
		"machinic_loop_mechandplayer")
end

function DoorAnimation()
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	ProgressBar(false, Config.Locale["Door1"], 9000)
end

function TrunkAnimation()
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	ProgressBar(false, Config.Locale["searching"], 12000)
end

function HoodAnimation()
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	ProgressBar(false, Config.Locale["Door1"], 12000)
end

function WheelChopAnimation()
	local ped = PlayerPedId()
	ProgressBar(false, Config.Locale["chopwheel"], 13000)
	RequestAnimDict("anim@heists@box_carry@")
	Wait(100)
	wheelprop = CreateObject(GetHashKey("imp_prop_impexp_tyre_01b"), 0, 0, 0, true, true, true)
	AttachEntityToEntity(wheelprop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 60309), -0.05, 0.2, 0.35, -145.0, 100.0,
		0.0, true, true, false, true, 1, true)
	SetEntityCoords(ped, 472.3670, -1311.3860, 28.2159)
	SetEntityHeading(ped, 124.7478)
	TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 2.0, 2.0, 1500, 51, 0, false, false, false)
	Wait(1500)
	DeleteEntity(wheelprop)
	DeleteEntity(wheelprop)
	DeleteObject(wheelprop)
	wheeleobj = CreateObject(GetHashKey("imp_prop_impexp_tyre_01b"), 471.8941, -1311.6477, 29.2602, true, true, true)
	PlaceObjectOnGroundProperly(wheeleobj)
	SetEntityHeading(wheeleobj, 290.6089)
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	Wait(12000)
	ClearPedTasks(ped)
	DeleteEntity(wheeleobj)
	DeleteEntity(wheeleobj)
	DeleteObject(wheeleobj)
end

function DoorChopAnimation()
	local ped = PlayerPedId()
	ProgressBar(false, Config.Locale["chopdoor"], 13000)
	RequestAnimDict("anim@heists@box_carry@")
	Wait(100)
	doorprop = CreateObject(GetHashKey("imp_prop_impexp_car_door_04a"), 0, 0, 0, true, true, true)
	AttachEntityToEntity(doorprop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 60309), 0.08, 0.28, 0.90, -115.0, 180.0,
		0.0, true, true, false, true, 1, true)
	SetEntityCoords(ped, 472.5670, -1311.3860, 28.2159)
	SetEntityHeading(ped, 124.747)
	TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 2.0, 2.0, 1500, 51, 0, false, false, false)
	Wait(1500)
	DetachEntity(doorprop, 1, true)
	DeleteEntity(doorprop)
	DeleteObject(doorprop)
	doorobj = CreateObject(GetHashKey("imp_prop_impexp_car_door_04a"), 471.5941, -1311.3477, 29.2602, true, true, true)
	PlaceObjectOnGroundProperly(doorobj)
	SetEntityHeading(doorobj, 37.1947)
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	Wait(12000)
	ClearPedTasks(ped)
	DeleteEntity(doorobj)
	DeleteEntity(doorobj)
	DeleteObject(doorobj)
end

function HoodChopAnimation()
	local ped = PlayerPedId()
	ProgressBar(false, Config.Locale["chophood"], 12500)
	RequestAnimDict("anim@heists@box_carry@")
	Wait(100)
	hoodprop = CreateObject(GetHashKey("imp_prop_impexp_bonnet_02a"), 0, 0, 0, true, true, true)
	AttachEntityToEntity(hoodprop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 60309), 0.15, -0.05, 0.24, -200.0, 110.0,
		0.0, true, true, false, true, 1, true)
	SetEntityCoords(ped, 472.8181, -1311.4249, 28.2183)
	SetEntityHeading(ped, 124.3253)
	TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 2.0, 2.0, 1000, 51, 0, false, false, false)
	Wait(1000)
	DetachEntity(hoodprop, 1, true)
	DeleteEntity(hoodprop)
	DeleteObject(hoodprop)
	hoodobj = CreateObject(GetHashKey("imp_prop_impexp_bonnet_02a"), 471.8663, -1311.6914, 29.86, true, true, true)
	SetEntityHeading(hoodobj, 118.1908)
	SetEntityRotation(hoodobj, 0.0, 80.0)
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	Wait(12000)
	ClearPedTasks(ped)
	DeleteEntity(hoodobj)
	DeleteEntity(hoodobj)
	DeleteObject(hoodobj)
end

function TrunkChopAnimation()
	local ped = PlayerPedId()
	ProgressBar(false, Config.Locale["choptrunk"], 12500)
	RequestAnimDict("anim@heists@box_carry@")
	Wait(100)
	trunkprop = CreateObject(GetHashKey("imp_prop_impexp_bonnet_02a"), 0, 0, 0, true, true, true)
	AttachEntityToEntity(trunkprop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 60309), 0.15, -0.05, 0.24, -200.0,
		110.0, 0.0, true, true, false, true, 1, true)
	SetEntityCoords(ped, 472.5044, -1311.2794, 28.2171)
	SetEntityHeading(ped, 122.8519)
	TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 2.0, 2.0, 1000, 51, 0, false, false, false)
	Wait(1000)
	DetachEntity(trunkprop, 1, true)
	DeleteEntity(trunkprop)
	DeleteObject(trunkprop)
	trunkobj = CreateObject(GetHashKey("imp_prop_impexp_bonnet_02a"), 471.7178, -1311.6902, 29.82, true, true, true)
	SetEntityHeading(trunkobj, 118.1908)
	SetEntityRotation(trunkobj, 0.0, 250.0)
	local ped = PlayerPedId()
	TaskStartScenarioInPlace(ped, 'WORLD_HUMAN_WELDING', 0, true)
	Wait(12000)
	ClearPedTasks(ped)
	DeleteEntity(trunkobj)
	DeleteEntity(trunkobj)
	DeleteObject(trunkobj)
end

RegisterNetEvent('bd-chopshop:wheelchopanim')
AddEventHandler('bd-chopshop:wheelchopanim', function()
	WheelChopAnimation()
end)

RegisterNetEvent('bd-chopshop:doorchopanim')
AddEventHandler('bd-chopshop:doorchopanim', function()
	DoorChopAnimation()
end)

RegisterNetEvent('bd-chopshop:hoodchopanim')
AddEventHandler('bd-chopshop:hoodchopanim', function()
	HoodChopAnimation()
end)

RegisterNetEvent('bd-chopshop:trunkchopanim')
AddEventHandler('bd-chopshop:trunkchopanim', function()
	TrunkChopAnimation()
end)
