diff --git a/README.md b/README.md index 1d9dfa0..b0e11be 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,18 @@ ### [Official QBCore Documentation](https://qbcore-framework.github.io/qb-docs/) +## QBCore is officially partnered with Sonoran Software! +Sonoran Software offers: +* [The most advanced, integrated CAD software](https://sonorancad.com/kakarot) +* [Complete community management software](https://sonorancms.com/kakarot) +* [In-depth radio communications simulator](https://sonoranradio.com/kakarot) +* [Premium server hosting](https://sonoranservers.com/kakarot) + +Use code `KAKAROT` for 20% off your first month at checkout! + +# Sonoran Software +![Sonoran Software Partnership](https://sonoransoftware.com/assets/images/promotional/partners/qb_banner_coupon.png) + # License QBCore Framework diff --git a/client/functions.lua b/client/functions.lua index c28084c..a9a4ef0 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -62,17 +62,19 @@ function QBCore.Functions.CreateBlip(coords, sprite, display, scale, colour, sho if not coords or not sprite or not display or not scale or not colour or shortRange == nil or not title then print("Blip failed to create, most likely missed a setting, debug log: ") print("Coords: " .. coords .. " Sprite: " .. sprite .. " Display: " .. display .. " scale: " .. scale .. " shortRange: " .. shortRange .. " Title: " .. title .. " if you're attempting to use a blip without a title, use an empty string.") - else - blip = AddBlipForCoord(coords) - SetBlipSprite(blip, sprite) - SetBlipDisplay(blip, display) - SetBlipScale(blip, scale) - SetBlipColour(blip, colour) - SetBlipAsShortRange(blip, shortRange) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString(title) - EndTextCommandSetBlipName(blip) + return end + + coords = type(coords) == 'table' and vec3(coords.x, coords.y, coords.z) or coords + blip = AddBlipForCoord(coords) + SetBlipSprite(blip, sprite) + SetBlipDisplay(blip, display) + SetBlipScale(blip, scale) + SetBlipColour(blip, colour) + SetBlipAsShortRange(blip, shortRange) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(title) + EndTextCommandSetBlipName(blip) end function QBCore.Functions.RequestAnimDict(animDict) @@ -403,6 +405,11 @@ function QBCore.Functions.GetPlate(vehicle) end function QBCore.Functions.SpawnClear(coords, radius) + if coords then + coords = type(coords) == 'table' and vec3(coords.x, coords.y, coords.z) or coords + else + coords = GetEntityCoords(ped) + end local vehicles = GetGamePool('CVehicle') local closeVeh = {} for i=1, #vehicles, 1 do diff --git a/server/functions.lua b/server/functions.lua index 4678928..ca45c36 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -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