mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 10:01:29 +00:00
Temp code revert for loadout updating, fixes ammo sync
This commit is contained in:
@@ -438,6 +438,7 @@ Citizen.CreateThread(function()
|
||||
|
||||
if loadoutChanged and isLoadoutLoaded then
|
||||
ESX.PlayerData.loadout = loadout
|
||||
TriggerServerEvent('esx:updateLoadout', loadout)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -236,6 +236,12 @@ AddEventHandler('esx:updateCoords', function(coords)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:updateLoadout')
|
||||
AddEventHandler('esx:updateLoadout', function(loadout)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
xPlayer.loadout = loadout
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:giveInventoryItem')
|
||||
AddEventHandler('esx:giveInventoryItem', function(target, type, itemName, itemCount)
|
||||
local playerId = source
|
||||
|
||||
Reference in New Issue
Block a user