Merge pull request #183 from Mustachedom/Framework_Dom_PR
- `add` Framework Functions
This commit is contained in:
3 files changed
+57
No files matched your search
@@ -51,6 +51,25 @@ Framework.GetPlayer = function(src)
|
||||
return player
|
||||
end
|
||||
|
||||
|
||||
---@description Returns the player data of the specified identifier in the framework defualt format.
|
||||
---@param citizenid string
|
||||
---@return table | nil
|
||||
Framework.GetPlayerByIdentifier = function(citizenid)
|
||||
local player = QBCore.Functions.GetPlayerByCitizenId(citizenid)
|
||||
if not player then return end
|
||||
return player
|
||||
end
|
||||
|
||||
---@description This will return the player source of the specified citizen ID.
|
||||
---@param citizenid string
|
||||
---@return number | nil
|
||||
Framework.GetPlayerSource = function(citizenid)
|
||||
local player = Framework.GetPlayerByIdentifier(citizenid)
|
||||
if not player then return end
|
||||
return player.PlayerData.source
|
||||
end
|
||||
|
||||
---@description This will return the jobs registered in the framework in a table.
|
||||
---@return table {name = jobName, label = jobLabel, grade = {name = gradeName, level = gradeLevel}}
|
||||
Framework.GetFrameworkJobs = function()
|
||||
|
||||
Reference in new issue
Block a user