From 707a43d4b8363206745c647361969e7072431a8b Mon Sep 17 00:00:00 2001 From: MeMo <73984552+memojustone@users.noreply.github.com> Date: Sat, 19 Feb 2022 08:56:02 +0200 Subject: [PATCH] fix (server/functions): BanTime fix. --- server/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index df63ca7..29b48eb 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -391,9 +391,9 @@ function QBCore.Functions.IsPlayerBanned(source) if os.time() < result.expire then retval = true local timeTable = os.date('*t', tonumber(result.expire)) - message = 'You have been banned from the server:\n' .. result[1].reason .. '\nYour ban expires ' .. timeTable.day .. '/' .. timeTable.month .. '/' .. timeTable.year .. ' ' .. timeTable.hour .. ':' .. timeTable.min .. '\n' + message = 'You have been banned from the server:\n' .. result.reason .. '\nYour ban expires ' .. timeTable.day .. '/' .. timeTable.month .. '/' .. timeTable.year .. ' ' .. timeTable.hour .. ':' .. timeTable.min .. '\n' else - MySQL.Async.execute('DELETE FROM bans WHERE id = ?', { result[1].id }) + MySQL.Async.execute('DELETE FROM bans WHERE id = ?', { result.id }) end end return retval, message