Skip to content

Commit

Permalink
fix(client/player/main.lua): WeaponList validation
Browse files Browse the repository at this point in the history
  • Loading branch information
CsokiHUN committed Jan 30, 2023
1 parent 9e478b5 commit 31534e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/player/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function HUD:SlowThick()
if not Config.Disable.Weapon then
self.Data.Weapon.Active, self.Data.Weapon.CurrentWeapon = GetCurrentPedWeapon(PlayerPedId(), false)
if self.Data.Weapon.CurrentWeapon == 0 then self.Data.Weapon.Active = false end
if self.Data.Weapon.Active then
if self.Data.Weapon.Active and WeaponList[self.Data.Weapon.CurrentWeapon] then
self.Data.Weapon.MaxAmmo = (GetAmmoInPedWeapon(PlayerPedId(), self.Data.Weapon.CurrentWeapon)-ammoInClip)
self.Data.Weapon.Name = WeaponList[self.Data.Weapon.CurrentWeapon].label and WeaponList[self.Data.Weapon.CurrentWeapon].label or false
self.Data.Weapon.isWeaponMelee = not WeaponList[self.Data.Weapon.CurrentWeapon].ammo
Expand Down

0 comments on commit 31534e2

Please sign in to comment.