mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
Merge branch 'main' of https://github.com/qbcore-framework/qb-core
This commit is contained in:
@@ -987,3 +987,10 @@ function QBCore.Functions.GetGroundZCoord(coords)
|
||||
return coords
|
||||
end
|
||||
end
|
||||
|
||||
function QBCore.Functions.GetGroundHash(entity)
|
||||
local coords = GetEntityCoords(entity)
|
||||
local num = StartShapeTestCapsule(coords.x, coords.y, coords.z + 4, coords.x, coords.y, coords.z - 2.0, 1, 1, entity, 7)
|
||||
local retval, success, endCoords, surfaceNormal, materialHash, entityHit = GetShapeTestResultEx(num)
|
||||
return materialHash, entityHit, surfaceNormal, endCoords, success, retval
|
||||
end
|
||||
|
||||
@@ -213,16 +213,16 @@ function PaycheckInterval()
|
||||
if account < payment then -- Checks if company has enough money to pay society
|
||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('error.company_too_poor'), 'error')
|
||||
else
|
||||
Player.Functions.AddMoney('bank', payment)
|
||||
Player.Functions.AddMoney('bank', payment, 'paycheck')
|
||||
exports['qb-management']:RemoveMoney(Player.PlayerData.job.name, payment)
|
||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
||||
end
|
||||
else
|
||||
Player.Functions.AddMoney('bank', payment)
|
||||
Player.Functions.AddMoney('bank', payment, 'paycheck')
|
||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
||||
end
|
||||
else
|
||||
Player.Functions.AddMoney('bank', payment)
|
||||
Player.Functions.AddMoney('bank', payment, 'paycheck')
|
||||
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
|
||||
end
|
||||
end
|
||||
|
||||
+4
-1
@@ -281,8 +281,8 @@ QBShared.Items = {
|
||||
['cokebaggy'] = {['name'] = 'cokebaggy', ['label'] = 'Bag of Coke', ['weight'] = 0, ['type'] = 'item', ['image'] = 'cocaine_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy real quick'},
|
||||
['crack_baggy'] = {['name'] = 'crack_baggy', ['label'] = 'Bag of Crack', ['weight'] = 0, ['type'] = 'item', ['image'] = 'crack_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy faster'},
|
||||
['xtcbaggy'] = {['name'] = 'xtcbaggy', ['label'] = 'Bag of XTC', ['weight'] = 0, ['type'] = 'item', ['image'] = 'xtc_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Pop those pills baby'},
|
||||
['weed_brick'] = {['name'] = 'weed_brick', ['label'] = 'Weed Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'weed_brick.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = '1KG Weed Brick to sell to large customers.'},
|
||||
['coke_brick'] = {['name'] = 'coke_brick', ['label'] = 'Coke Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'coke_brick.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Heavy package of cocaine, mostly used for deals and takes a lot of space'},
|
||||
['weed_brick'] = {['name'] = 'weed_brick', ['label'] = 'Weed Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'weed_brick.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = '1KG Weed Brick to sell to large customers.'},
|
||||
['coke_small_brick'] = {['name'] = 'coke_small_brick', ['label'] = 'Coke Package', ['weight'] = 350, ['type'] = 'item', ['image'] = 'coke_small_brick.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Small package of cocaine, mostly used for deals and takes a lot of space'},
|
||||
['oxy'] = {['name'] = 'oxy', ['label'] = 'Prescription Oxy', ['weight'] = 0, ['type'] = 'item', ['image'] = 'oxy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'The Label Has Been Ripped Off'},
|
||||
['meth'] = {['name'] = 'meth', ['label'] = 'Meth', ['weight'] = 100, ['type'] = 'item', ['image'] = 'meth_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A baggie of Meth'},
|
||||
@@ -393,4 +393,7 @@ QBShared.Items = {
|
||||
['markedbills'] = {['name'] = 'markedbills', ['label'] = 'Marked Money', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'markedbills.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Money?'},
|
||||
['labkey'] = {['name'] = 'labkey', ['label'] = 'Key', ['weight'] = 500, ['type'] = 'item', ['image'] = 'labkey.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Key for a lock...?'},
|
||||
['printerdocument'] = {['name'] = 'printerdocument', ['label'] = 'Document', ['weight'] = 500, ['type'] = 'item', ['image'] = 'printerdocument.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A nice document'},
|
||||
['newscam'] = {['name'] = 'newscam', ['label'] = 'News Camera', ['weight'] = 100, ['type'] = 'item', ['image'] = 'newscam.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A camera for the news'},
|
||||
['newsmic'] = {['name'] = 'newsmic', ['label'] = 'News Microphone', ['weight'] = 100, ['type'] = 'item', ['image'] = 'newsmic.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A microphone for the news'},
|
||||
['newsbmic'] = {['name'] = 'newsbmic', ['label'] = 'Boom Microphone', ['weight'] = 100, ['type'] = 'item', ['image'] = 'newsbmic.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A Useable BoomMic'},
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ local function translateKey(phrase, subs)
|
||||
|
||||
-- Initial Scan over result looking for substituions
|
||||
for k, v in pairs(subs) do
|
||||
local templateToFind = '%%{' .. k .. '}'
|
||||
local templateToFind = '%{' .. k .. '}'
|
||||
result = result:gsub(templateToFind, tostring(v)) -- string to allow all types
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user