diff --git a/lua/entities/base_glide_car/cl_init.lua b/lua/entities/base_glide_car/cl_init.lua index 2b7252f..8911e60 100644 --- a/lua/entities/base_glide_car/cl_init.lua +++ b/lua/entities/base_glide_car/cl_init.lua @@ -586,7 +586,6 @@ local w, h, x, y --- Override this base class function. function ENT:DrawVehicleHUD( screenW, screenH ) - if hook.Run( "Glide_CanDrawHUD", self ) == false then return end BaseClass.DrawVehicleHUD( self, screenW, screenH ) if not Config.showHUD then return end diff --git a/lua/glide/client/events.lua b/lua/glide/client/events.lua index abf6d9f..f14dcb9 100644 --- a/lua/glide/client/events.lua +++ b/lua/glide/client/events.lua @@ -56,7 +56,11 @@ local activeVehicle, activeSeatIndex = NULL, 0 local cvarDrawHud = GetConVar( "cl_drawhud" ) local function DrawVehicleHUD() - if IsValid( activeVehicle ) and cvarDrawHud:GetBool() then + if + IsValid( activeVehicle ) and + cvarDrawHud:GetBool() and + hook.Run( "Glide_CanDrawHUD", activeVehicle ) ~= false + then activeVehicle:DrawVehicleHUD( ScrW(), ScrH() ) end end