From b509e0438ea6a58bda3037c393f273826baef0ed Mon Sep 17 00:00:00 2001 From: Seef0x <47392375+Seef0x@users.noreply.github.com> Date: Sun, 29 Dec 2024 01:18:17 +0100 Subject: [PATCH] Fix server console database checking --- gamemode/modules/base/sh_util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemode/modules/base/sh_util.lua b/gamemode/modules/base/sh_util.lua index 35dc82754..a74387ab2 100644 --- a/gamemode/modules/base/sh_util.lua +++ b/gamemode/modules/base/sh_util.lua @@ -381,13 +381,13 @@ if CLIENT then net.Receive("DarkRP_databaseCheckMessage", fc{print, net.ReadStri local function checkDatabase(ply) local dbFile = SERVER and "sv.db" or "cl.db" - local display = (CLIENT or ply == game.GetWorld() or not IsValid(ply)) and print or function(msg) + local display = (CLIENT or not IsValid(ply)) and print or function(msg) net.Start("DarkRP_databaseCheckMessage") net.WriteString(msg) net.Send(ply) end - if SERVER and IsValid(ply) and ply ~= game.GetWorld() and not ply:IsSuperAdmin() then + if SERVER and IsValid(ply) and not ply:IsSuperAdmin() then display("You must be superadmin") return end