Merge branch 'dev' into dev

This commit is contained in:
BerkieBb
2022-02-19 12:54:19 +01:00
committed by GitHub
3 changed files with 31 additions and 12 deletions
+2 -2
View File
@@ -352,9 +352,9 @@ function QBCore.Functions.IsPlayerBanned(source)
if not result then return false end
if os.time() < result.expire then
local timeTable = os.date('*t', tonumber(result.expire))
return true, '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'
return true, '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
return false
end