-- Crazy Zipties & HeadBags
['ziptie'] ={['name'] = 'ziptie', ['label'] = 'Zip tie', ['weight'] = 300, ['type'] = 'item', ['image'] = 'ziptie.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A zip tie'},
['headbag'] ={['name'] = 'headbag', ['label'] = 'Head Bag', ['weight'] = 500, ['type'] = 'item', ['image'] = 'headbag.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A bag to cover someones head'},
RegisterNetEvent('police:client:GetEscorted', function(playerId)
local ped = PlayerPedId()
QBCore.Functions.GetPlayerData(function(PlayerData)
if PlayerData.metadata["isdead"] or isHandcuffed or PlayerData.metadata["inlaststand"] or PlayerData.metadata['ishandcuffed'] then
if not isEscorted then
isEscorted = true
local dragger = GetPlayerPed(GetPlayerFromServerId(playerId))
SetEntityCoords(ped, GetOffsetFromEntityInWorldCoords(dragger, 0.0, 0.45, 0.0))
AttachEntityToEntity(ped, dragger, 11816, 0.45, 0.45, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true)
else
isEscorted = false
DetachEntity(ped, true, false)
end
TriggerEvent('hospital:client:isEscorted', isEscorted)
end
end)
end)