mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Undrag if cop dies
This commit is contained in:
+6
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user