mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Fixed problems with /clearloadout
This commit is contained in:
@@ -416,6 +416,11 @@ function CreateExtendedPlayer(player, accounts, inventory, job, loadout, name, l
|
||||
if self.loadout[i].name == weaponName then
|
||||
weaponLabel = self.loadout[i].label
|
||||
|
||||
for j=1, #self.loadout[i].components, 1 do
|
||||
TriggerClientEvent('esx:removeWeaponComponent', self.source, weaponName, self.loadout[i].components[j])
|
||||
table.remove(self.loadout[i].components, j)
|
||||
end
|
||||
|
||||
table.remove(self.loadout, i)
|
||||
break
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user