refactor(es_extended/server/main): remove unused event

This commit is contained in:
Kenshin13
2025-06-14 20:57:37 +02:00
parent d892df079f
commit b28cf88273
-19
View File
@@ -388,25 +388,6 @@ AddEventHandler("esx:playerLogout", function(playerId, cb)
TriggerClientEvent("esx:onPlayerLogout", playerId)
end)
AddEventHandler('esx:playerCrashed', function(identifier, cb)
local xPlayer = ESX.GetPlayerFromIdentifier(identifier)
if xPlayer then
local playerId = xPlayer.playerId
local isExist = DoesPlayerExist(playerId --[[@as string]])
if playerId and isExist ~= 0 then
TriggerEvent('esx:playerDropped', playerId)
GlobalState["playerCount"] = GlobalState["playerCount"] - 1
Core.playersByIdentifier[identifier] = nil
ESX.Players[playerId] = nil
if cb then
cb()
end
end
end
end)
if not Config.CustomInventory then
RegisterNetEvent("esx:updateWeaponAmmo", function(weaponName, ammoCount)
local xPlayer = ESX.GetPlayerFromId(source)