mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 17:01:33 +00:00
28 lines
589 B
Lua
28 lines
589 B
Lua
QBCore = {}
|
|
QBCore.PlayerData = {}
|
|
QBCore.Config = QBConfig
|
|
QBCore.Shared = QBShared
|
|
QBCore.ServerCallbacks = {}
|
|
|
|
isLoggedIn = false
|
|
|
|
function GetCoreObject()
|
|
return QBCore
|
|
end
|
|
|
|
RegisterNetEvent('QBCore:GetObject')
|
|
AddEventHandler('QBCore:GetObject', function(cb)
|
|
cb(GetCoreObject())
|
|
end)
|
|
|
|
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
|
|
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
|
|
ShutdownLoadingScreenNui()
|
|
isLoggedIn = true
|
|
end)
|
|
|
|
RegisterNetEvent('QBCore:Client:OnPlayerUnload')
|
|
AddEventHandler('QBCore:Client:OnPlayerUnload', function()
|
|
isLoggedIn = false
|
|
end)
|