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
+12
View File
@@ -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
+17 -10
View File
@@ -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
+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