From b140b79a0078263d2dd65bec4bb06b204392e00d Mon Sep 17 00:00:00 2001 From: DyaMetR Date: Thu, 30 Nov 2023 11:20:11 +0100 Subject: [PATCH] Fixed errors with undefined CustomAmmoDisplay --- lua/autorun/gta3hud.lua | 6 +++--- lua/autorun/gta3hud/ammo.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/autorun/gta3hud.lua b/lua/autorun/gta3hud.lua index b0fc558..e241c38 100644 --- a/lua/autorun/gta3hud.lua +++ b/lua/autorun/gta3hud.lua @@ -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 ]]-------------------------------------------------------------------- @@ -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'}, diff --git a/lua/autorun/gta3hud/ammo.lua b/lua/autorun/gta3hud/ammo.lua index b3ae524..17b3f9b 100644 --- a/lua/autorun/gta3hud/ammo.lua +++ b/lua/autorun/gta3hud/ammo.lua @@ -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