mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Buying weapon attachments bug fix
Weapon name as a string was supposed to be used, instead it was receiving weapon information as a table.
This commit is contained in:
@@ -386,8 +386,8 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
if component then
|
||||
if not self.hasWeaponComponent(weaponName, weaponComponent) then
|
||||
self.loadout[loadoutNum].components[#self.loadout[loadoutNum].components + 1] = weaponComponent
|
||||
local componentHash = ESX.GetWeaponComponent(weapon, weaponComponent).hash
|
||||
GiveWeaponComponentToPed(GetPlayerPed(self.source), joaat(weapon), componentHash)
|
||||
local componentHash = ESX.GetWeaponComponent(weaponName, weaponComponent).hash
|
||||
GiveWeaponComponentToPed(GetPlayerPed(self.source), joaat(weaponName), componentHash)
|
||||
self.triggerEvent('esx:addInventoryItem', component.label, false, true)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user