Added native qbox for future proofing

This commit is contained in:
Nass committed 2025-10-10 21:52:39 -07:00
1 parent c62ac80013
commit adfcd5b3da
2 files changed
+12 -1

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
if GetResourceState('qb-core') ~= 'started' then return end
if GetResourceState('qb-core') ~= 'started' or GetResourceState('qbx_core') == 'started' then return end
QBCore = exports["qb-core"]:GetCoreObject()
function getPlayerIdentifier(source)
+11
View File
@@ -0,0 +1,11 @@
--This was added for future proofing, in case qbx removes qbcore bridge
if GetResourceState('qbx_core') ~= 'started' then return end
function getPlayerIdentifier(source)
local xPlayer = exports.qbx_core:GetPlayer(source)
return xPlayer.PlayerData.citizenid
end
AddEventHandler('QBCore:Server:PlayerLoaded', function(Player) --Hopefully they don't remove this event when the remove the bridge
onPlayerLoaded(Player.PlayerData.citizenid, Player.PlayerData.source)
end)