local function OpenTrunk()
local vehicle = QBCore.Functions.GetClosestVehicle()
LoadAnimDict("amb@prop_human_bum_bin@idle_b")
TaskPlayAnim(PlayerPedId(), "amb@prop_human_bum_bin@idle_b", "idle_d", 4.0, 4.0, -1, 50, 0, false, false, false)
if IsBackEngine(GetEntityModel(vehicle)) then
SetVehicleDoorOpen(vehicle, 4, false, false)
else
SetVehicleDoorOpen(vehicle, 5, false, false)
end
end
---Closes the trunk of the closest vehicle
local function CloseTrunk()
local vehicle = QBCore.Functions.GetClosestVehicle()
LoadAnimDict("amb@prop_human_bum_bin@idle_b")
TaskPlayAnim(PlayerPedId(), "amb@prop_human_bum_bin@idle_b", "exit", 4.0, 4.0, -1, 50, 0, false, false, false)
if IsBackEngine(GetEntityModel(vehicle)) then
SetVehicleDoorShut(vehicle, 4, false)
else
SetVehicleDoorShut(vehicle, 5, false)
end
end