Team Spartan Cookies & Milk Forums
Hudshoulddraw - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Hudshoulddraw (/thread-2376.html)

Pages: 1 2


Hudshoulddraw - 4N0NYM - 18-07-2017

I found out that when the EF2(TSCM) Style is enabled it block somehow the hook to work, aslong this is active the HUD cant prevented it to draw.

(I'm using the Example http://wiki.garrysmod.com/page/GM/HUDShouldDraw)


RE: Hudshoulddraw - Person8880 - 18-07-2017

This should be fixed after a restart.


RE: Hudshoulddraw - 4N0NYM - 20-01-2018

Just want to bring it back cuz it still dont work or dont work anymore.


RE: Hudshoulddraw - Person8880 - 21-01-2018

It's definitely called. What are you trying to do with it?


RE: Hudshoulddraw - 4N0NYM - 21-01-2018

i use the example from the Glua docs
 local hide = {
CHudHealth = true,
CHudBattery = true,
}

hook.add( "hudshoulddraw", "HideHUD", function( name )
if ( hide[ name ] ) then return false end
end )



RE: Hudshoulddraw - Person8880 - 21-01-2018

These are already hidden by the EF2 HUD. Are you trying to hide parts of the EF2 HUD?


RE: Hudshoulddraw - 4N0NYM - 21-01-2018

no, i didnt knowed there was something for the EF2

when i use
HudString = "Found = "
Hud = {}
if CLIENT then
hook("hudshoulddraw","hud",function(Name)
if Hud[Name] ~= true then
Hud[Name] = true
HudString = (HudString.." | "..Name)
end
end)
timer.simple(5,function() printConsole(HudString) end)
end
i only get :
LuaHudDeathNotice | NetGraph | CHudDeathNotice | CHudChat | CHudWeaponSelection | CHudHealth | CHudSecondaryAmmo | CHudAmmo | CHudGMod | CHudTrain | CHudMessage | CHudMenu | CHudWeapon | CHudHintDisplay | CHudCrosshair | CHudCloseCaption


RE: Hudshoulddraw - 4N0NYM - 21-01-2018

The only thing i found to hide it is "CHudGMod" but it disable all.


RE: Hudshoulddraw - Person8880 - 21-01-2018

There is no way to hide it currently. Are you asking for a way to hide it through the hudshoulddraw hook?


RE: Hudshoulddraw - 4N0NYM - 21-01-2018

yes, that we doesnt need to change it back to normal to see costum huds.