missing hidehelptext stuff
This commit is contained in:
1 parent
a17eb15217
commit
2fd01dd2ae
3 files changed
+49
-10
No files matched your search
@@ -9,18 +9,20 @@ Framework.GetFrameworkName = function()
|
|||||||
return 'es_extended'
|
return 'es_extended'
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return a table of the players data, this is an internal table and should not be used.
|
||||||
---@return table
|
---@return table
|
||||||
Framework.GetPlayerData = function()
|
Framework.GetPlayerData = function()
|
||||||
return ESX.PlayerData
|
return ESX.PlayerData
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---This will return a table of all the jobs in the framework.
|
||||||
|
---@return table
|
||||||
Framework.GetFrameworkJobs = function()
|
Framework.GetFrameworkJobs = function()
|
||||||
local jobs = lib.callback.await('community_bridge:Callback:GetFrameworkJobs', false)
|
local jobs = lib.callback.await('community_bridge:Callback:GetFrameworkJobs', false)
|
||||||
return jobs
|
return jobs
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return the players birth date
|
||||||
---@return string
|
---@return string
|
||||||
Framework.GetPlayerDob = function()
|
Framework.GetPlayerDob = function()
|
||||||
local playerData = ESX.GetPlayerData()
|
local playerData = ESX.GetPlayerData()
|
||||||
@@ -28,11 +30,14 @@ Framework.GetPlayerDob = function()
|
|||||||
return dob
|
return dob
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---This will return the players metadata for the specified metadata key.
|
||||||
|
---@param metadata string
|
||||||
|
---@return table | nil
|
||||||
Framework.GetPlayerMetaData = function(metadata)
|
Framework.GetPlayerMetaData = function(metadata)
|
||||||
return ESX.GetPlayerData().metadata[metadata]
|
return ESX.GetPlayerData().metadata[metadata]
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will prompt the user with a notification message
|
||||||
---@param message string
|
---@param message string
|
||||||
---@param type string
|
---@param type string
|
||||||
---@param time number
|
---@param time number
|
||||||
@@ -41,14 +46,28 @@ Framework.Notify = function(message, type, time)
|
|||||||
return ESX.ShowNotification(message, type, time)
|
return ESX.ShowNotification(message, type, time)
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---Will Display the help text message on the screen
|
||||||
|
---@param message string
|
||||||
|
---@param _ unknown
|
||||||
|
---@return nil
|
||||||
|
Framework.ShowHelpText = function(message, _)
|
||||||
|
return exports['esx_textui']:TextUI(message, "info")
|
||||||
|
end
|
||||||
|
|
||||||
|
---This will hide the help text message on the screen
|
||||||
|
---@return nil
|
||||||
|
Framework.HideHelpText = function()
|
||||||
|
return exports['esx_textui']:HideUI()
|
||||||
|
end
|
||||||
|
|
||||||
|
---This will return the players identifier
|
||||||
---@return string
|
---@return string
|
||||||
Framework.GetPlayerIdentifier = function()
|
Framework.GetPlayerIdentifier = function()
|
||||||
local playerData = ESX.GetPlayerData()
|
local playerData = ESX.GetPlayerData()
|
||||||
return playerData.identifier
|
return playerData.identifier
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return the players first name, and the last name
|
||||||
---@return string
|
---@return string
|
||||||
---@return string
|
---@return string
|
||||||
Framework.GetPlayerName = function()
|
Framework.GetPlayerName = function()
|
||||||
@@ -56,7 +75,7 @@ Framework.GetPlayerName = function()
|
|||||||
return playerData.firstName, playerData.lastName
|
return playerData.firstName, playerData.lastName
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return the players job name, job label, job grade label and job grade level
|
||||||
---@return string
|
---@return string
|
||||||
---@return string
|
---@return string
|
||||||
---@return string
|
---@return string
|
||||||
@@ -66,7 +85,7 @@ Framework.GetPlayerJob = function()
|
|||||||
return playerData.job.name, playerData.job.label, playerData.job.grade_label, playerData.job.grade
|
return playerData.job.name, playerData.job.label, playerData.job.grade_label, playerData.job.grade
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return a boolean if the player has the item in their inventory
|
||||||
---@param item string
|
---@param item string
|
||||||
---@return boolean
|
---@return boolean
|
||||||
Framework.HasItem = function(item)
|
Framework.HasItem = function(item)
|
||||||
@@ -74,14 +93,14 @@ Framework.HasItem = function(item)
|
|||||||
return hasItem > 0 and true or false
|
return hasItem > 0 and true or false
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return a table of the players inventory
|
||||||
---@return table
|
---@return table
|
||||||
Framework.GetPlayerInventory = function()
|
Framework.GetPlayerInventory = function()
|
||||||
local playerData = ESX.GetPlayerData()
|
local playerData = ESX.GetPlayerData()
|
||||||
return playerData.inventory
|
return playerData.inventory
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return a number of the item in the players inventory
|
||||||
---@param item string
|
---@param item string
|
||||||
---@return number
|
---@return number
|
||||||
Framework.GetItemCount = function(item)
|
Framework.GetItemCount = function(item)
|
||||||
@@ -90,7 +109,7 @@ Framework.GetItemCount = function(item)
|
|||||||
return inventory[item].count or 0
|
return inventory[item].count or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This will return a boolean if the player is dead
|
||||||
---@return boolean
|
---@return boolean
|
||||||
Framework.GetIsPlayerDead = function()
|
Framework.GetIsPlayerDead = function()
|
||||||
local playerData = ESX.GetPlayerData()
|
local playerData = ESX.GetPlayerData()
|
||||||
|
|||||||
@@ -49,10 +49,16 @@ Framework.Notify = function(message, type, time)
|
|||||||
TriggerEvent('QBCore:Notify', message, 'primary', time)
|
TriggerEvent('QBCore:Notify', message, 'primary', time)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---Will Display the help text message on the screen
|
||||||
|
---@param message string
|
||||||
|
---@param _position unknown
|
||||||
|
---@return nil
|
||||||
Framework.ShowHelpText = function(message, _position)
|
Framework.ShowHelpText = function(message, _position)
|
||||||
return exports['qb-core']:DrawText(message, _position)
|
return exports['qb-core']:DrawText(message, _position)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---This will hide the help text message on the screen
|
||||||
|
---@return nil
|
||||||
Framework.HideHelpText = function()
|
Framework.HideHelpText = function()
|
||||||
return exports['qb-core']:HideText()
|
return exports['qb-core']:HideText()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,6 +22,20 @@ Framework.GetPlayerDob = function()
|
|||||||
return playerData.charinfo.birthdate
|
return playerData.charinfo.birthdate
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---Will Display the help text message on the screen
|
||||||
|
---@param message string
|
||||||
|
---@param _ unknown
|
||||||
|
---@return nil
|
||||||
|
Framework.ShowHelpText = function(message, _)
|
||||||
|
return print("Community_bridge:WARN: ShowHelpText is not implemented for this framework, please set the helptext module to hide the help text.")
|
||||||
|
end
|
||||||
|
|
||||||
|
---This will hide the help text message on the screen
|
||||||
|
---@return nil
|
||||||
|
Framework.HideHelpText = function()
|
||||||
|
return print("Community_bridge:WARN: HideHelpText is not implemented for this framework, please set the helptext module to hide the help text.")
|
||||||
|
end
|
||||||
|
|
||||||
Framework.GetPlayerMetaData = function(metadata)
|
Framework.GetPlayerMetaData = function(metadata)
|
||||||
local playerData = QBox.GetPlayerData()
|
local playerData = QBox.GetPlayerData()
|
||||||
return playerData.metadata[metadata]
|
return playerData.metadata[metadata]
|
||||||
|
|||||||
Reference in new issue
Block a user