even better way to fix bug with duplicating money and weapons

In my solution, I check if player has weapon/money that officers might want to take server-side. Previous solutions were vulnerable e.g. if two or more officers were searching one player and all took weapon or money at the same time, they would all get that items.
This commit is contained in:
P0Xyio
2020-11-17 11:42:04 +00:00
parent f6788b3d14
commit 1367f5ebaa
2 changed files with 22 additions and 9 deletions
+1 -1
View File
@@ -495,7 +495,7 @@ function OpenBodySearchMenu(player)
}, function(data, menu)
if data.current.value then
TriggerServerEvent('esx_policejob:confiscatePlayerItem', GetPlayerServerId(player), data.current.itemType, data.current.value, data.current.amount)
menu.close()
OpenBodySearchMenu(player)
end
end, function(data, menu)
menu.close()