Undrag if cop dies

This commit is contained in:
ElPumpo
2018-12-22 12:29:02 +01:00
parent 048f291d81
commit d062d101d6
+6 -3
View File
@@ -767,7 +767,7 @@ function OpenBodySearchMenu(player)
if data.accounts[i].name == 'black_money' and data.accounts[i].money > 0 then
table.insert(elements, {
label = _U('confiscate_dirty', ESX.Round(data.accounts[i].money)),
label = _U('confiscate_dirty', ESX.Math.Round(data.accounts[i].money)),
value = 'black_money',
itemType = 'item_account',
amount = data.accounts[i].money
@@ -802,7 +802,6 @@ function OpenBodySearchMenu(player)
end
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'body_search',
{
title = _U('search'),
@@ -1258,7 +1257,6 @@ AddEventHandler('esx_phone:cancelMessage', function(dispatchNumber)
end
end)
AddEventHandler('esx_policejob:hasEnteredMarker', function(station, part, partNum)
if part == 'Cloakroom' then
@@ -1449,6 +1447,11 @@ Citizen.CreateThread(function()
DetachEntity(playerPed, true, false)
end
if IsPedDeadOrDying(targetPed, true) then
DragStatus.IsDragged = false
DetachEntity(playerPed, true, false)
end
else
DetachEntity(playerPed, true, false)
end