Fixed broken checks for admin menu

This commit is contained in:
ZioPao
2024-10-22 00:10:40 +02:00
parent 68605ddb35
commit 849c17051a

View File

@@ -9,7 +9,15 @@ local DataController = require("TOC/Controllers/DataController")
---@param worldobjects table ---@param worldobjects table
local function AddAdminTocOptions(playerNum, context, worldobjects) local function AddAdminTocOptions(playerNum, context, worldobjects)
if (isClient() and not isDebugEnabled()) or isAdmin() then return end -- SP Check
if not isDebugEnabled() then return end
--TOC_DEBUG.print("Debug enabled")
-- MP check
if isClient() and not isAdmin() then return end
--TOC_DEBUG.print("MP and Admin")
local players = {} local players = {}
for _, v in ipairs(worldobjects) do for _, v in ipairs(worldobjects) do