Merge pull request #4 from qwezertino/qwezert_fixes

fix add access to core Shared table for qb-core, fix small typos, fix position for ox notify, add api to core Commands for qb-core
This commit is contained in:
MrNewb authored and GitHub committed 2025-01-12 11:08:04 -05:00
commit 50b5eaeb02
3 files changed
+17 -2

No files matched your search

+11 -1
View File
@@ -49,6 +49,8 @@ Framework.GetIsPlayerDead = function()
return QBCore.Functions.GetPlayerData().metadata["isdead"] or QBCore.GetPlayerData().metadata["inlaststand"]
end
Framework.Shared = QBCore.Shared
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(1500)
FillBridgeTables()
@@ -65,5 +67,13 @@ RegisterNetEvent('QBCore:Client:OnJobUpdate', function(data)
PlayerJobLabel = data.label
PlayerJobGradeName = data.grade.name
PlayerJobGradeLevel = data.grade.level
TriggerEvent('community_bridge:Client:OnPlayerJobUpdate',PlayerJobName, PlayerJobLabel, PlayerJobGradeName, PlayerJobGradeLevel)
TriggerEvent('community_bridge:Client:OnPlayerJobUpdate', PlayerJobName, PlayerJobLabel, PlayerJobGradeName, PlayerJobGradeLevel)
end)
RegisterNetEvent('QBCore:Client:OnGangUpdate', function(data)
PlayerJobName = data.name
PlayerJobLabel = data.label
PlayerJobGradeName = data.grade.name
PlayerJobGradeLevel = data.grade.level
TriggerEvent('community_bridge:Client:OnPlayerGangUpdate', PlayerGangName, PlayerGangLabel, PlayerGangGradeName, PlayerGangGradeLevel)
end)
+5
View File
@@ -244,4 +244,9 @@ end
-- Registers a usable item with a callback function.
Framework.RegisterUsableItem = function(item, cb)
QBCore.Functions.CreateUseableItem(item, cb)
end
Framework.Commands = {}
Framework.Commands.Add = function(name, help, arguments, argsrequired, callback, permission, ...)
QBCore.Commands.Add(name, help, arguments, argsrequired, callback, permission, ...)
end
+1 -1
View File
@@ -13,7 +13,7 @@ Notify.SendNotify = function(message, type, time)
elseif notifyType == 'esx_notify' then
return ESX.ShowNotification(message, type, time)
elseif notifyType == 'ox' then
return exports.ox_lib:notify({ description = message, type = type, position = 'top' })
return exports.ox_lib:notify({ description = message, type = type, position = 'center-left' })
elseif notifyType == 't-notify' then
return exports['t-notify']:Alert({ style = 'info', message = message, duration = time, })
elseif notifyType == 'wasabi_notify' then