Skip to content

Commit

Permalink
Fixed errors with undefined CustomAmmoDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
DyaMetR committed Nov 30, 2023
1 parent c3ea8b9 commit b140b79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lua/autorun/gta3hud.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--[[------------------------------------------------------------------
Grand Theft Auto 3D Universe HUD
November 7th, 2023
November 30th, 2023
Made by DyaMetR
* full credits found in the details below
]]--------------------------------------------------------------------
Expand All @@ -13,8 +13,8 @@ GTA3HUD.hookname = 'gta3hud'
if CLIENT then
-- addon information
GTA3HUD.name = 'GTA 3D Universe HUD'
GTA3HUD.version = '1.2.2'
GTA3HUD.date = 'November 7th, 2023'
GTA3HUD.version = '1.2.3'
GTA3HUD.date = 'November 30th, 2023'
GTA3HUD.credits = { -- {name, contribution}
{'DyaMetR', '#gta3hud.credits.author'},
{'Rockstar Games', '#gta3hud.credits.rockstar'},
Expand Down
2 changes: 1 addition & 1 deletion lua/autorun/gta3hud/ammo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function GTA3HUD.ammo.Primary()
if not IsValid(weapon) then return false end

-- check whether it's a SWEP with a custom ammunition display
if weapon:IsScripted() then
if weapon:IsScripted() and weapon.CustomAmmoDisplay then
local ammo = weapon:CustomAmmoDisplay()
if ammo then
local clip, reserve = ammo.PrimaryClip, ammo.PrimaryAmmo
Expand Down

0 comments on commit b140b79

Please sign in to comment.