feat Framework.GetIsPlayerLoaded, locale tweaks

This commit is contained in:
MrNewb committed 2025-07-10 13:50:47 -04:00
1 parent 58ab40d14e
commit a280606c3d
32 files changed
+526 -259

No files matched your search

+8 -2
View File
@@ -11,8 +11,7 @@ local cachedItemList = nil
Framework.ItemList = function()
if cachedItemList then return cachedItemList end
local items = Callback.Trigger('community_bridge:Callback:GetFrameworkItems', false)
local fakeShared = { Items = items.Items or {} }
cachedItemList = fakeShared
cachedItemList = { Items = items.Items or {} }
return cachedItemList
end
@@ -22,6 +21,13 @@ Framework.GetFrameworkName = function()
return 'es_extended'
end
---This will return true if the player is loaded, false otherwise.
---This could be useful in scripts that rely on player loaded events and offer a debug mode to hit this function.
---@return boolean
Framework.GetIsPlayerLoaded = function()
return ESX.IsPlayerLoaded()
end
---This will return a table of the player data, this will be in the framework format.
---This is mainly for internal bridge use and should be avoided.
---@return table
+7
View File
@@ -14,6 +14,13 @@ Framework.GetFrameworkName = function()
return 'qb-core'
end
---This will return true if the player is loaded, false otherwise.
---This could be useful in scripts that rely on player loaded events and offer a debug mode to hit this function.
---@return boolean
Framework.GetIsPlayerLoaded = function()
return LocalPlayer.state.isLoggedIn or false
end
---This will return a table of the player data, this will be in the framework format.
---This is mainly for internal bridge use and should be avoided.
---@return table
+7
View File
@@ -11,6 +11,13 @@ Framework.GetFrameworkName = function()
return 'qbx_core'
end
---This will return true if the player is loaded, false otherwise.
---This could be useful in scripts that rely on player loaded events and offer a debug mode to hit this function.
---@return boolean
Framework.GetIsPlayerLoaded = function()
return LocalPlayer.state.isLoggedIn or false
end
---This will return a table of the player data, this will be in the framework format.
---This is mainly for internal bridge use and should be avoided.
---@return table