饥荒联机版

饥荒联机版

Hide HUD Status
Lio 2021 年 3 月 8 日 下午 6:12
Fix to avoid crash (in main menu)
This check is to see when the player exists:
_G.ThePlayer ~= nil

Add that line in the function (like this):
local function HUD() --hide HUD if HUD_Status == true and _G.ThePlayer ~= nil then if not _G.ThePlayer.HUD:IsChatInputScreenOpen() and not _G.ThePlayer.HUD:IsConsoleScreenOpen() and not _G.ThePlayer.HUD.writeablescreen then _G.ThePlayer.HUD:Hide() HUD_Status = false end else --show HUD if _G.ThePlayer ~= nil then _G.ThePlayer.HUD:Show() HUD_Status = true end end end

Now only works when the player exists on a server! :DSTportal:
(and does not work when the game is in main menu)
最后由 Lio 编辑于; 2021 年 3 月 27 日 下午 8:12