mirror of
https://github.com/CFC-Servers/cfc_ulx_commands.git
synced 2025-03-04 03:13:28 -05:00
Don't block the menu (#136)
* Don't block the main menu * Don't block weapon selection
This commit is contained in:
parent
da10b4166d
commit
1b308c5f41
@ -1,4 +1,8 @@
|
||||
local EFFECT_NAME = "NoHud"
|
||||
local ALLOWED_HUD_ELEMENTS = {
|
||||
CHudMenu = true,
|
||||
CHudWeaponSelection = true,
|
||||
}
|
||||
|
||||
|
||||
CFCUlxCurse.RegisterEffect( {
|
||||
@ -7,7 +11,9 @@ CFCUlxCurse.RegisterEffect( {
|
||||
onStart = function( cursedPly )
|
||||
if SERVER then return end
|
||||
|
||||
CFCUlxCurse.AddEffectHook( cursedPly, EFFECT_NAME, "HUDShouldDraw", "NoHudPls", function()
|
||||
CFCUlxCurse.AddEffectHook( cursedPly, EFFECT_NAME, "HUDShouldDraw", "NoHudPls", function( elementName )
|
||||
if ALLOWED_HUD_ELEMENTS[elementName] then return end
|
||||
|
||||
return false
|
||||
end )
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user