MSK Weaponammo
Documentation for msk_weaponammo
Common Errors
SCRIPT ERROR: @es_extended/common/functions.lua:54: bad argument #1 to 'upper' (string expected, got table)function self.addWeaponComponent(weaponName, weaponComponent)
local loadoutNum, weapon = self.getWeapon(weaponName)
if weapon then
local component = ESX.GetWeaponComponent(weaponName, weaponComponent)
if component then
if not self.hasWeaponComponent(weaponName, weaponComponent) then
self.loadout[loadoutNum].components[#self.loadout[loadoutNum].components + 1] = weaponComponent
GiveWeaponComponentToPed(GetPlayerPed(self.source), joaat(weaponName), component.hash)
self.triggerEvent('esx:addInventoryItem', component.label, false, true)
end
end
end
endLast updated