Enforcing consistent annotations and fixing spelling mistakes
This commit is contained in:
1 parent
a15a79603b
commit
3ce3b7fe57
4 files changed
+137
-156
No files matched your search
@@ -8,33 +8,33 @@ QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
Framework.Shared = QBCore.Shared
|
||||
|
||||
---This will get the name of the framework being used (if a supported framework).
|
||||
---@description This will get the name of the framework being used (if a supported framework).
|
||||
---@return string
|
||||
Framework.GetFrameworkName = function()
|
||||
return 'qb-core'
|
||||
end
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@description This will get the name of the in use resource.
|
||||
---@return string
|
||||
Framework.GetResourceName = function()
|
||||
return 'qb-core'
|
||||
end
|
||||
|
||||
---This will return true if the player is loaded, false otherwise.
|
||||
---@description 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.
|
||||
---@description 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
|
||||
Framework.GetPlayerData = function()
|
||||
return QBCore.Functions.GetPlayerData()
|
||||
end
|
||||
|
||||
---This will return a table of all the jobs in the framework.
|
||||
---@description This will return a table of all the jobs in the framework.
|
||||
---@return table
|
||||
Framework.GetFrameworkJobs = function()
|
||||
local jobs = {}
|
||||
@@ -48,7 +48,7 @@ Framework.GetFrameworkJobs = function()
|
||||
return jobs
|
||||
end
|
||||
|
||||
---This will get the players birth date
|
||||
---@description This will get the players birth date
|
||||
---@return string
|
||||
Framework.GetPlayerDob = function()
|
||||
local player = Framework.GetPlayerData()
|
||||
@@ -56,14 +56,14 @@ Framework.GetPlayerDob = function()
|
||||
return playerData.charinfo.birthdate
|
||||
end
|
||||
|
||||
---This will return the players metadata for the specified metadata key.
|
||||
---@description This will return the players metadata for the specified metadata key.
|
||||
---@param metadata table | string
|
||||
---@return table | string | number | boolean
|
||||
Framework.GetPlayerMetaData = function(metadata)
|
||||
return Framework.GetPlayerData().metadata[metadata]
|
||||
end
|
||||
|
||||
---This will send a notification to the player.
|
||||
---@description This will send a notification to the player.
|
||||
---@param message string
|
||||
---@param type string
|
||||
---@param time number
|
||||
@@ -72,7 +72,7 @@ Framework.Notify = function(message, type, time)
|
||||
TriggerEvent('QBCore:Notify', message, 'primary', time)
|
||||
end
|
||||
|
||||
---Will Display the help text message on the screen
|
||||
---@description This will display the help text message on the screen
|
||||
---@param message string
|
||||
---@param _position unknown
|
||||
---@return nil
|
||||
@@ -80,14 +80,14 @@ Framework.ShowHelpText = function(message, _position)
|
||||
return exports['qb-core']:DrawText(message, _position)
|
||||
end
|
||||
|
||||
---This will hide the help text message on the screen
|
||||
---@description This will hide the help text message on the screen
|
||||
---@return nil
|
||||
Framework.HideHelpText = function()
|
||||
return exports['qb-core']:HideText()
|
||||
end
|
||||
|
||||
---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
|
||||
---Use case is for a ui or a menu I guess.
|
||||
---@description This will return the players money by type, I recommend not using this
|
||||
---as its the client and not secure or to be trusted. Use case is for a ui or a menu I guess.
|
||||
---@param _type string
|
||||
---@return number
|
||||
Framework.GetAccountBalance = function(_type)
|
||||
@@ -98,7 +98,7 @@ Framework.GetAccountBalance = function(_type)
|
||||
return account[_type] or 0
|
||||
end
|
||||
|
||||
---This will return the item data for the specified item.
|
||||
---@description This will return the item data for the specified item.
|
||||
---@param item string
|
||||
---@return table
|
||||
Framework.GetItemInfo = function(item)
|
||||
@@ -115,27 +115,27 @@ Framework.GetItemInfo = function(item)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---This will get the hunger of a player
|
||||
---@description This will get the hunger of a player
|
||||
---@return number
|
||||
Framework.GetHunger = function()
|
||||
local hunger = Framework.GetPlayerMetaData("hunger") or 0
|
||||
return math.floor((hunger) + 0.5) or 0
|
||||
end
|
||||
|
||||
---This will get the thirst of a player
|
||||
---@description This will get the thirst of a player
|
||||
---@return number
|
||||
Framework.GetThirst = function()
|
||||
local thirst = Framework.GetPlayerMetaData("thirst") or 0
|
||||
return math.floor((thirst) + 0.5) or 0
|
||||
end
|
||||
|
||||
---This will get the players identifier (citizenid) etc.
|
||||
---@description This will get the players identifier (citizenid) etc.
|
||||
---@return string
|
||||
Framework.GetPlayerIdentifier = function()
|
||||
return Framework.GetPlayerData().citizenid
|
||||
end
|
||||
|
||||
---This will get the players name (first and last).
|
||||
---@description This will get the players name (first and last).
|
||||
---@return string
|
||||
---@return string
|
||||
Framework.GetPlayerName = function()
|
||||
@@ -143,7 +143,7 @@ Framework.GetPlayerName = function()
|
||||
return playerData.charinfo.firstname, playerData.charinfo.lastname
|
||||
end
|
||||
|
||||
---Depricated : This will return the players job name, job label, job grade label and job grade level
|
||||
---@deprecated Deprecated: This will return the players job name, job label, job grade label and job grade level
|
||||
---@return string
|
||||
---@return string
|
||||
---@return string
|
||||
@@ -153,7 +153,7 @@ Framework.GetPlayerJob = function()
|
||||
return playerData.job.name, playerData.job.label, playerData.job.grade.name, playerData.job.grade.level
|
||||
end
|
||||
|
||||
---This will return the players job name, job label, job grade label job grade level, boss status, and duty status in a table
|
||||
---@description This will return the players job name, job label, job grade label job grade level, boss status, and duty status in a table
|
||||
---@return table
|
||||
Framework.GetPlayerJobData = function()
|
||||
local playerData = Framework.GetPlayerData()
|
||||
@@ -169,14 +169,14 @@ Framework.GetPlayerJobData = function()
|
||||
}
|
||||
end
|
||||
|
||||
---This will return if the player has the specified item in their inventory.
|
||||
---@description This will return if the player has the specified item in their inventory
|
||||
---@param item string
|
||||
---@return boolean
|
||||
Framework.HasItem = function(item)
|
||||
return QBCore.Functions.HasItem(item)
|
||||
end
|
||||
|
||||
---This will return the item count for the specified item in the players inventory.
|
||||
---@description This will return the item count for the specified item in the players inventory
|
||||
---@param item string
|
||||
---@return number
|
||||
Framework.GetItemCount = function(item)
|
||||
@@ -190,7 +190,7 @@ Framework.GetItemCount = function(item)
|
||||
return count
|
||||
end
|
||||
|
||||
---This will return the players inventory as a table in the ox_inventory style flormat.
|
||||
---@description This will return the players inventory as a table in the ox_inventory style format
|
||||
---@return table
|
||||
Framework.GetPlayerInventory = function()
|
||||
local items = {}
|
||||
@@ -210,7 +210,7 @@ Framework.GetPlayerInventory = function()
|
||||
return items
|
||||
end
|
||||
|
||||
---This will return the vehicle properties for the specified vehicle.
|
||||
---@description This will return the vehicle properties for the specified vehicle
|
||||
---@param vehicle number
|
||||
---@return table
|
||||
Framework.GetVehicleProperties = function(vehicle)
|
||||
@@ -219,7 +219,7 @@ Framework.GetVehicleProperties = function(vehicle)
|
||||
return vehicleProps or {}
|
||||
end
|
||||
|
||||
---This will set the vehicle properties for the specified vehicle.
|
||||
---@description This will set the vehicle properties for the specified vehicle
|
||||
---@param vehicle number
|
||||
---@param properties table
|
||||
---@return boolean
|
||||
@@ -241,7 +241,7 @@ Framework.SetVehicleProperties = function(vehicle, properties)
|
||||
return true, QBCore.Functions.SetVehicleProperties(vehicle, properties)
|
||||
end
|
||||
|
||||
---This will get a players dead status.
|
||||
---@description This will get a players dead status
|
||||
---@return boolean
|
||||
Framework.GetIsPlayerDead = function()
|
||||
local playerData = Framework.GetPlayerData()
|
||||
|
||||
@@ -8,19 +8,19 @@ QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
Framework.Shared = QBCore.Shared
|
||||
|
||||
---This will return the name of the framework in use.
|
||||
---@description This will return the name of the framework in use.
|
||||
---@return string
|
||||
Framework.GetFrameworkName = function()
|
||||
return 'qb-core'
|
||||
end
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@description This will get the name of the in use resource.
|
||||
---@return string
|
||||
Framework.GetResourceName = function()
|
||||
return 'qb-core'
|
||||
end
|
||||
|
||||
---This will return if the player is an admin in the framework.
|
||||
---@description This will return if the player is an admin in the framework.
|
||||
---@param src any
|
||||
---@return boolean
|
||||
Framework.GetIsFrameworkAdmin = function(src)
|
||||
@@ -28,8 +28,7 @@ Framework.GetIsFrameworkAdmin = function(src)
|
||||
return QBCore.Functions.HasPermission(src, 'admin')
|
||||
end
|
||||
|
||||
-- Framework.GetPlayerIdentifier(src)
|
||||
-- Returns the citizen ID of the player.
|
||||
---@description This will return the citizen ID of the player.
|
||||
---@param src number
|
||||
---@return string | nil
|
||||
Framework.GetPlayerIdentifier = function(src)
|
||||
@@ -39,7 +38,7 @@ Framework.GetPlayerIdentifier = function(src)
|
||||
return playerData.citizenid
|
||||
end
|
||||
|
||||
--- Returns the player data of the specified source in the framework defualt format.
|
||||
---@description Returns the player data of the specified source in the framework defualt format.
|
||||
---@param src any
|
||||
---@return table | nil
|
||||
Framework.GetPlayer = function(src)
|
||||
@@ -48,10 +47,8 @@ Framework.GetPlayer = function(src)
|
||||
return player
|
||||
end
|
||||
|
||||
---This will return the jobs registered in the framework in a table.
|
||||
---Format of the table is:
|
||||
---{name = jobName, label = jobLabel, grade = {name = gradeName, level = gradeLevel}}
|
||||
---@return table
|
||||
---@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()
|
||||
local jobs = {}
|
||||
for k, v in pairs(QBCore.Shared.Jobs) do
|
||||
@@ -64,8 +61,7 @@ Framework.GetFrameworkJobs = function()
|
||||
return jobs
|
||||
end
|
||||
|
||||
-- Framework.GetPlayerName(src)
|
||||
-- Returns the first and last name of the player.
|
||||
---@description Returns the first and last name of the player.
|
||||
---@return string|nil, string|nil
|
||||
Framework.GetPlayerName = function(src)
|
||||
local player = Framework.GetPlayer(src)
|
||||
@@ -74,7 +70,7 @@ Framework.GetPlayerName = function(src)
|
||||
return playerData.charinfo.firstname, playerData.charinfo.lastname
|
||||
end
|
||||
|
||||
---Returns the player date of birth.
|
||||
---@description Returns the player date of birth.
|
||||
---@param src number
|
||||
---@return string|nil
|
||||
Framework.GetPlayerDob = function(src)
|
||||
@@ -84,12 +80,11 @@ Framework.GetPlayerDob = function(src)
|
||||
return playerData.charinfo.birthdate
|
||||
end
|
||||
|
||||
---Returns a table of items matching the specified name and if passed metadata from the player's inventory.
|
||||
---returns {name = v.name, count = v.amount, metadata = v.info, slot = v.slot}
|
||||
---@description Returns a table of items matching the specified name and if passed metadata from the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param metadata table
|
||||
---@return table|nil
|
||||
---@return table|nil {name = v.name, count = v.amount, metadata = v.info, slot = v.slot}
|
||||
Framework.GetItem = function(src, item, metadata)
|
||||
local player = Framework.GetPlayer(src)
|
||||
if not player then return end
|
||||
@@ -109,9 +104,9 @@ Framework.GetItem = function(src, item, metadata)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---This will return a table with the item info, {name, label, stack, weight, description, image}
|
||||
---@description This will return a table with the item info
|
||||
---@param item string
|
||||
---@return table
|
||||
---@return table {name, label, stack, weight, description, image}
|
||||
Framework.GetItemInfo = function(item)
|
||||
local itemData = QBCore.Shared.Items[item]
|
||||
if not itemData then return {} end
|
||||
@@ -126,8 +121,7 @@ Framework.GetItemInfo = function(item)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---This will return the count of the item in the players inventory, if not found will return 0.
|
||||
---
|
||||
---@description This will return the count of the item in the players inventory, if not found will return 0
|
||||
---if metadata is passed it will find the matching items count.
|
||||
---@param src number
|
||||
---@param item string
|
||||
@@ -147,7 +141,7 @@ Framework.GetItemCount = function(src, item, metadata)
|
||||
return count
|
||||
end
|
||||
|
||||
---This will return a boolean if the player has the item.
|
||||
---@description This will return a boolean if the player has the item.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@return boolean
|
||||
@@ -156,11 +150,9 @@ Framework.HasItem = function(src, item)
|
||||
return getCount > 0
|
||||
end
|
||||
|
||||
-- Framework.GetPlayerInventory(src)
|
||||
-- Returns the entire inventory of the player as a table.
|
||||
-- returns {name = v.name, count = v.amount, metadata = v.info, slot = v.slot}
|
||||
---@description Returns the entire inventory of the player as a table.
|
||||
---@param src number
|
||||
---@return table | nil
|
||||
---@return table | nil {name = v.name, count = v.amount, metadata = v.info, slot = v.slot}
|
||||
Framework.GetPlayerInventory = function(src)
|
||||
local player = Framework.GetPlayer(src)
|
||||
if not player then return end
|
||||
@@ -178,7 +170,7 @@ Framework.GetPlayerInventory = function(src)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---This will return a table of all logged in players
|
||||
---@description This will return a table of all logged in players
|
||||
---@return table
|
||||
Framework.GetPlayers = function()
|
||||
local players = QBCore.Functions.GetPlayers()
|
||||
@@ -189,11 +181,10 @@ Framework.GetPlayers = function()
|
||||
return playerList
|
||||
end
|
||||
|
||||
---This will return the item data for the specified slot.
|
||||
---Format {name, label, weight, count, metadata, slot, stack, description}
|
||||
---@description This will return the item data for the specified slot.
|
||||
---@param src number
|
||||
---@param slot number
|
||||
---@return table|nil
|
||||
---@return table|nil {name, label, weight, count, metadata, slot, stack, description}
|
||||
Framework.GetItemBySlot = function(src, slot)
|
||||
local player = Framework.GetPlayer(src)
|
||||
if not player then return end
|
||||
@@ -217,8 +208,7 @@ Framework.GetItemBySlot = function(src, slot)
|
||||
return repack
|
||||
end
|
||||
|
||||
-- Framework.SetMetadata(src, metadata, value)
|
||||
-- Adds the specified metadata key and number value to the player's data.
|
||||
---@description Adds the specified metadata key and number value to the player's data.
|
||||
---@return boolean|nil
|
||||
Framework.SetPlayerMetadata = function(src, metadata, value)
|
||||
local player = Framework.GetPlayer(src)
|
||||
@@ -227,8 +217,7 @@ Framework.SetPlayerMetadata = function(src, metadata, value)
|
||||
return true
|
||||
end
|
||||
|
||||
-- Framework.GetMetadata(src, metadata)
|
||||
-- Gets the specified metadata key to the player's data.
|
||||
---@description Gets the specified metadata key to the player's data.
|
||||
---@param src number
|
||||
---@param metadata string
|
||||
---@return any|nil
|
||||
@@ -239,8 +228,8 @@ Framework.GetPlayerMetadata = function(src, metadata)
|
||||
return playerData.metadata[metadata] or false
|
||||
end
|
||||
|
||||
-- Framework.AddStress(src, value)
|
||||
-- Adds the specified value to the player's stress level and updates the client HUD.
|
||||
|
||||
---@description Adds the specified value to the player's stress level and updates the client HUD.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -254,8 +243,7 @@ Framework.AddStress = function(src, value)
|
||||
return newStress
|
||||
end
|
||||
|
||||
-- Framework.RemoveStress(src, value)
|
||||
-- Removes the specified value from the player's stress level and updates the client HUD.
|
||||
---@description Removes the specified value from the player's stress level and updates the client HUD.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -269,8 +257,7 @@ Framework.RemoveStress = function(src, value)
|
||||
return newStress
|
||||
end
|
||||
|
||||
-- Framework.AddHunger(src, value)
|
||||
-- Adds the specified value from the player's hunger level.
|
||||
---@description Adds the specified value from the player's hunger level.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -285,8 +272,7 @@ Framework.AddHunger = function(src, value)
|
||||
return newHunger
|
||||
end
|
||||
|
||||
-- Framework.AddThirst(src, value)
|
||||
-- Adds the specified value from the player's thirst level.
|
||||
---@description Adds the specified value from the player's thirst level.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -301,7 +287,7 @@ Framework.AddThirst = function(src, value)
|
||||
return newThirst
|
||||
end
|
||||
|
||||
---This will get the hunger of a player
|
||||
---@description This will get the hunger of a player
|
||||
---@param src number
|
||||
---@return number | nil
|
||||
Framework.GetHunger = function(src)
|
||||
@@ -312,7 +298,7 @@ Framework.GetHunger = function(src)
|
||||
return math.floor((newHunger) + 0.5) or 0
|
||||
end
|
||||
|
||||
---This will return a boolean if the player is dead or in last stand.
|
||||
---@description This will return a boolean if the player is dead or in last stand.
|
||||
---@param src number
|
||||
---@return boolean|nil
|
||||
Framework.GetIsPlayerDead = function(src)
|
||||
@@ -322,7 +308,7 @@ Framework.GetIsPlayerDead = function(src)
|
||||
return playerData.metadata.isdead or playerData.metadata.inlaststand or false
|
||||
end
|
||||
|
||||
---This will revive a player, if the player is dead or in last stand.
|
||||
---@description This will revive a player, if the player is dead or in last stand.
|
||||
---@param src number
|
||||
---@return boolean
|
||||
Framework.RevivePlayer = function(src)
|
||||
@@ -333,7 +319,7 @@ Framework.RevivePlayer = function(src)
|
||||
end
|
||||
|
||||
|
||||
---This will get the thirst of a player
|
||||
---@description This will get the thirst of a player
|
||||
---@param src any
|
||||
---@return number | nil
|
||||
Framework.GetThirst = function(src)
|
||||
@@ -344,8 +330,7 @@ Framework.GetThirst = function(src)
|
||||
return math.floor((newThirst) + 0.5) or 0
|
||||
end
|
||||
|
||||
-- Framework.GetPlayerPhone(src)
|
||||
-- Returns the phone number of the player.
|
||||
---@description Returns the phone number of the player.
|
||||
---@param src number
|
||||
---@return string | nil
|
||||
Framework.GetPlayerPhone = function(src)
|
||||
@@ -355,8 +340,7 @@ Framework.GetPlayerPhone = function(src)
|
||||
return playerData.charinfo.phone
|
||||
end
|
||||
|
||||
-- Framework.GetPlayerGang(src)
|
||||
-- Returns the gang name of the player.
|
||||
---@description Returns the gang name of the player.
|
||||
---@param src number
|
||||
---@return string | nil
|
||||
Framework.GetPlayerGang = function(src)
|
||||
@@ -366,14 +350,14 @@ Framework.GetPlayerGang = function(src)
|
||||
return playerData.gang.name
|
||||
end
|
||||
|
||||
---This will get a table of player sources that have the specified job name.
|
||||
---@description This will get a table of player sources that have the specified job name.
|
||||
---@param job string
|
||||
---@return table
|
||||
Framework.GetPlayersByJob = function(job)
|
||||
return Framework.GetPlayerSourcesByJob(job) or {}
|
||||
end
|
||||
|
||||
---Depricated: Returns the job name, label, grade name, and grade level of the player.
|
||||
---@deprecated Deprecated: Returns the job name, label, grade name, and grade level of the player.
|
||||
---@param src number
|
||||
---@return string | string | string | number | nil
|
||||
---@return string | string | string | number | nil
|
||||
@@ -386,7 +370,8 @@ Framework.GetPlayerJob = function(src)
|
||||
return playerData.job.name, playerData.job.label, playerData.job.grade.name, playerData.job.grade.level
|
||||
end
|
||||
|
||||
---This will return the players job name, job label, job grade label job grade level, boss status, and duty status in a table
|
||||
---@description This will return the players job name, job label, job grade label job grade level, boss status,
|
||||
---and duty status in a table
|
||||
---@param src number
|
||||
---@return table | nil
|
||||
Framework.GetPlayerJobData = function(src)
|
||||
@@ -405,7 +390,7 @@ Framework.GetPlayerJobData = function(src)
|
||||
}
|
||||
end
|
||||
|
||||
---Returns the players duty status.
|
||||
---@description Returns the players duty status.
|
||||
---@param src number
|
||||
---@return boolean | nil
|
||||
Framework.GetPlayerDuty = function(src)
|
||||
@@ -416,7 +401,7 @@ Framework.GetPlayerDuty = function(src)
|
||||
return true
|
||||
end
|
||||
|
||||
---This will toggle a players duty status
|
||||
---@description This will toggle a players duty status
|
||||
---@param src number
|
||||
---@param status boolean
|
||||
---@return boolean
|
||||
@@ -428,7 +413,7 @@ Framework.SetPlayerDuty = function(src, status)
|
||||
return true
|
||||
end
|
||||
|
||||
-- Sets the player's job to the specified name and grade.
|
||||
---@description Sets the player's job to the specified name and grade.
|
||||
---@param src number
|
||||
---@param name string
|
||||
---@param grade string
|
||||
@@ -439,7 +424,7 @@ Framework.SetPlayerJob = function(src, name, grade)
|
||||
return player.Functions.SetJob(name, grade)
|
||||
end
|
||||
|
||||
---This will add money based on the type of account (money/bank)
|
||||
---@description This will add money based on the type of account (money/bank)
|
||||
---@param src number
|
||||
---@param _type string
|
||||
---@param amount number
|
||||
@@ -451,7 +436,7 @@ Framework.AddAccountBalance = function(src, _type, amount)
|
||||
return player.Functions.AddMoney(_type, amount)
|
||||
end
|
||||
|
||||
---This will remove money based on the type of account (money/bank)
|
||||
---@description This will remove money based on the type of account (money/bank)
|
||||
---@param src number
|
||||
---@param _type string
|
||||
---@param amount number
|
||||
@@ -463,7 +448,7 @@ Framework.RemoveAccountBalance = function(src, _type, amount)
|
||||
return player.Functions.RemoveMoney(_type, amount)
|
||||
end
|
||||
|
||||
---This will remove money based on the type of account (money/bank)
|
||||
---@description This will remove money based on the type of account (money/bank)
|
||||
---@param src number
|
||||
---@param _type string
|
||||
---@return string | nil
|
||||
@@ -475,8 +460,7 @@ Framework.GetAccountBalance = function(src, _type)
|
||||
return playerData.money[_type]
|
||||
end
|
||||
|
||||
-- Framework.AddItem(src, item, amount, slot, metadata)
|
||||
-- Adds the specified item to the player's inventory.
|
||||
---@description Adds the specified item to the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param amount number
|
||||
@@ -490,8 +474,7 @@ Framework.AddItem = function(src, item, amount, slot, metadata)
|
||||
return player.Functions.AddItem(item, amount, slot, metadata)
|
||||
end
|
||||
|
||||
-- Framework.RemoveItem(src, item, amount, slot, metadata)
|
||||
-- Removes the specified item from the player's inventory.
|
||||
---@description Removes the specified item from the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param amount number
|
||||
@@ -505,9 +488,8 @@ Framework.RemoveItem = function(src, item, amount, slot, metadata)
|
||||
return player.Functions.RemoveItem(item, amount, slot or nil)
|
||||
end
|
||||
|
||||
-- Framework.SetMetadata(src, item, slot, metadata)
|
||||
-- Sets the metadata for the specified item in the player's inventory.
|
||||
-- Notes, this is kinda a jank workaround. with the framework aside from updating the entire table theres not really a better way
|
||||
---@description Sets the metadata for the specified item in the player's inventory.
|
||||
---Notes, this is kinda a jank workaround. with the framework aside from updating the entire table theres not really a better way
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param slot number
|
||||
@@ -531,7 +513,7 @@ Framework.SetMetadata = function(src, item, slot, metadata)
|
||||
return player.Functions.AddItem(item, 1, slot, metadata)
|
||||
end
|
||||
|
||||
---This will get all owned vehicles for the player
|
||||
---@description This will get all owned vehicles for the player
|
||||
---@param src number
|
||||
---@return table
|
||||
Framework.GetOwnedVehicles = function(src)
|
||||
@@ -546,8 +528,7 @@ Framework.GetOwnedVehicles = function(src)
|
||||
return vehicles
|
||||
end
|
||||
|
||||
-- Framework.RegisterUsableItem(item, cb)
|
||||
-- Registers a usable item with a callback function.
|
||||
---@description Registers a usable item with a callback function.
|
||||
---@param itemName string
|
||||
---@param cb function
|
||||
Framework.RegisterUsableItem = function(itemName, cb)
|
||||
|
||||
@@ -11,40 +11,40 @@ Framework.GetFrameworkName = function()
|
||||
return 'qbx_core'
|
||||
end
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@description This will get the name of the in use resource.
|
||||
---@return string
|
||||
Framework.GetResourceName = 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.
|
||||
---@description 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.
|
||||
---@description 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
|
||||
Framework.GetPlayerData = function()
|
||||
return QBox.GetPlayerData()
|
||||
end
|
||||
|
||||
---This will return a table of all the jobs in the framework.
|
||||
---@description This will return a table of all the jobs in the framework.
|
||||
---@return table
|
||||
Framework.GetFrameworkJobs = function()
|
||||
return QBox.GetJobs()
|
||||
end
|
||||
|
||||
---This will get the players birth date
|
||||
---@descriptionThis will get the players birth date
|
||||
---@return string
|
||||
Framework.GetPlayerDob = function()
|
||||
local playerData = Framework.GetPlayerData()
|
||||
return playerData.charinfo.birthdate
|
||||
end
|
||||
|
||||
---Will Display the help text message on the screen
|
||||
---@description This will display the help text message on the screen
|
||||
---@param message string
|
||||
---@param position string
|
||||
---@return nil
|
||||
@@ -52,20 +52,20 @@ Framework.ShowHelpText = function(message, position)
|
||||
return exports.ox_lib:showTextUI(message, { position = position or 'top-center' })
|
||||
end
|
||||
|
||||
---This will hide the help text message on the screen
|
||||
---@description This will hide the help text message on the screen
|
||||
---@return nil
|
||||
Framework.HideHelpText = function()
|
||||
return exports.ox_lib:hideTextUI()
|
||||
end
|
||||
|
||||
---This will return the players metadata for the specified metadata key.
|
||||
---@description This will return the players metadata for the specified metadata key.
|
||||
---@param metadata table | string
|
||||
---@return table | string | number | boolean
|
||||
Framework.GetPlayerMetaData = function(metadata)
|
||||
return Framework.GetPlayerData().metadata[metadata]
|
||||
end
|
||||
|
||||
---This will send a notification to the player.
|
||||
---@description This will send a notification to the player.
|
||||
---@param message string
|
||||
---@param type string
|
||||
---@param time number
|
||||
@@ -74,27 +74,27 @@ Framework.Notify = function(message, type, time)
|
||||
return QBox:Notify("Notification", type, time, message)
|
||||
end
|
||||
|
||||
---This will get the hunger of a player
|
||||
---@description This will get the hunger of a player
|
||||
---@return number
|
||||
Framework.GetHunger = function()
|
||||
local hunger = Framework.GetPlayerMetaData("hunger") or 0
|
||||
return math.floor((hunger) + 0.5) or 0
|
||||
end
|
||||
|
||||
---This will get the thirst of a player
|
||||
---@description This will get the thirst of a player
|
||||
---@return number
|
||||
Framework.GetThirst = function()
|
||||
local thirst = Framework.GetPlayerMetaData("thirst") or 0
|
||||
return math.floor((thirst) + 0.5) or 0
|
||||
end
|
||||
|
||||
---This will get the players identifier (citizenid) etc.
|
||||
---@description This will get the players identifier (citizenid) etc.
|
||||
---@return string
|
||||
Framework.GetPlayerIdentifier = function()
|
||||
return Framework.GetPlayerData().citizenid
|
||||
end
|
||||
|
||||
---This will get the players name (first and last).
|
||||
---@description This will get the players name (first and last).
|
||||
---@return string
|
||||
---@return string
|
||||
Framework.GetPlayerName = function()
|
||||
@@ -102,7 +102,7 @@ Framework.GetPlayerName = function()
|
||||
return playerData.charinfo.firstname, playerData.charinfo.lastname
|
||||
end
|
||||
|
||||
---Depricated : This will return the players job name, job label, job grade label and job grade level
|
||||
---@deprecated Deprecated: This will return the players job name, job label, job grade label and job grade level
|
||||
---@return string
|
||||
---@return string
|
||||
---@return string
|
||||
@@ -112,7 +112,8 @@ Framework.GetPlayerJob = function()
|
||||
return playerData.job.name, playerData.job.label, playerData.job.grade.name, playerData.job.grade.level
|
||||
end
|
||||
|
||||
---This will return the players job name, job label, job grade label job grade level, boss status, and duty status in a table
|
||||
---@description This will return the players job name, job label, job grade label job grade level, boss status,
|
||||
---and duty status in a table
|
||||
---@return table
|
||||
Framework.GetPlayerJobData = function()
|
||||
local playerData = Framework.GetPlayerData()
|
||||
@@ -128,14 +129,14 @@ Framework.GetPlayerJobData = function()
|
||||
}
|
||||
end
|
||||
|
||||
---This will return the players inventory as a table in the ox_inventory style flormat.
|
||||
---@description This will return the players inventory as a table in the ox_inventory style flormat.
|
||||
---@return table
|
||||
Framework.GetPlayerInventory = function()
|
||||
return Framework.GetPlayerData().items
|
||||
end
|
||||
|
||||
---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
|
||||
---Use case is for a ui or a menu I guess.
|
||||
---@description This will return the players money by type, I recommend not using this
|
||||
---as its the client and not secure or to be trusted. Use case is for a ui or a menu I guess.
|
||||
---@param _type string
|
||||
---@return number
|
||||
Framework.GetAccountBalance = function(_type)
|
||||
@@ -146,7 +147,7 @@ Framework.GetAccountBalance = function(_type)
|
||||
return account[_type] or 0
|
||||
end
|
||||
|
||||
---This will return the vehicle properties for the specified vehicle.
|
||||
---@description This will return the vehicle properties for the specified vehicle.
|
||||
---@param vehicle number
|
||||
---@return table
|
||||
Framework.GetVehicleProperties = function(vehicle)
|
||||
@@ -155,7 +156,7 @@ Framework.GetVehicleProperties = function(vehicle)
|
||||
return vehicleProps or {}
|
||||
end
|
||||
|
||||
---This will set the vehicle properties for the specified vehicle.
|
||||
---@description This will set the vehicle properties for the specified vehicle.
|
||||
---@param vehicle number
|
||||
---@param properties table
|
||||
---@return boolean
|
||||
@@ -177,7 +178,7 @@ Framework.SetVehicleProperties = function(vehicle, properties)
|
||||
return true, lib.setVehicleProperties(vehicle, properties)
|
||||
end
|
||||
|
||||
---This will return the item count for the specified item in the players inventory.
|
||||
---@description This will return the item count for the specified item in the players inventory.
|
||||
---@param item string
|
||||
---@return number
|
||||
Framework.GetItemCount = function(item)
|
||||
@@ -185,7 +186,7 @@ Framework.GetItemCount = function(item)
|
||||
return 0, print("Community_bridge:WARN: GetItemCount is not implemented for this framework, please use the inventory module to get the item count. If you are using a diffrent inventory please let us know so we can bridge it and have less nonsense.")
|
||||
end
|
||||
|
||||
---This will get a players dead status.
|
||||
---@description This will get a players dead status.
|
||||
---@return boolean
|
||||
Framework.GetIsPlayerDead = function()
|
||||
local playerData = Framework.GetPlayerData()
|
||||
|
||||
@@ -11,13 +11,13 @@ Framework.GetFrameworkName = function()
|
||||
return 'qbx_core'
|
||||
end
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@description This will get the name of the in use resource.
|
||||
---@return string
|
||||
Framework.GetResourceName = function()
|
||||
return 'qbx_core'
|
||||
end
|
||||
|
||||
---This will return if the player is an admin in the framework.
|
||||
---@description This will return if the player is an admin in the framework.
|
||||
---@param src any
|
||||
---@return boolean
|
||||
Framework.GetIsFrameworkAdmin = function(src)
|
||||
@@ -25,7 +25,7 @@ Framework.GetIsFrameworkAdmin = function(src)
|
||||
return IsPlayerAceAllowed(src, 'admin')
|
||||
end
|
||||
|
||||
---Returns the player date of birth.
|
||||
---@description Returns the player date of birth.
|
||||
---@param src number
|
||||
---@return string|nil
|
||||
Framework.GetPlayerDob = function(src)
|
||||
@@ -35,7 +35,7 @@ Framework.GetPlayerDob = function(src)
|
||||
return playerData.charinfo.birthdate
|
||||
end
|
||||
|
||||
--- Returns the player data of the specified source.
|
||||
---@description Returns the player data of the specified source.
|
||||
---@param src any
|
||||
---@return table | nil
|
||||
Framework.GetPlayer = function(src)
|
||||
@@ -44,13 +44,13 @@ Framework.GetPlayer = function(src)
|
||||
return player
|
||||
end
|
||||
|
||||
---Returns a table of the jobs in the framework.
|
||||
---@description Returns a table of the jobs in the framework.
|
||||
---@return table
|
||||
Framework.GetFrameworkJobs = function()
|
||||
return QBox.GetJobs()
|
||||
end
|
||||
|
||||
---Returns the citizen ID of the player.
|
||||
---@description Returns the citizen ID of the player.
|
||||
---@param src number
|
||||
---@return string | boolean | nil
|
||||
Framework.GetPlayerIdentifier = function(src)
|
||||
@@ -61,7 +61,7 @@ Framework.GetPlayerIdentifier = function(src)
|
||||
return playerData.citizenid
|
||||
end
|
||||
|
||||
---This will return a table of all logged in players
|
||||
---@description This will return a table of all logged in players
|
||||
---@return table
|
||||
Framework.GetPlayers = function()
|
||||
local players = QBox:GetQBPlayers()
|
||||
@@ -72,7 +72,7 @@ Framework.GetPlayers = function()
|
||||
return playerList
|
||||
end
|
||||
|
||||
---Returns the first and last name of the player.
|
||||
---@description Returns the first and last name of the player.
|
||||
---@param src number
|
||||
---@return string | nil
|
||||
---@return string | nil
|
||||
@@ -83,12 +83,11 @@ Framework.GetPlayerName = function(src)
|
||||
return playerData.charinfo.firstname, playerData.charinfo.lastname
|
||||
end
|
||||
|
||||
---Returns a table of items matching the specified name and if passed metadata from the player's inventory.
|
||||
---returns {name = v.name, count = v.amount, metadata = v.info, slot = v.slot}
|
||||
---@description Returns a table of items matching the specified name and if passed metadata from the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param metadata table
|
||||
---@return table|nil
|
||||
---@return table|nil {name = v.name, count = v.amount, metadata = v.info, slot = v.slot}
|
||||
Framework.GetItem = function(src, item, metadata)
|
||||
local player = Framework.GetPlayer(src)
|
||||
if not player then return end
|
||||
@@ -107,7 +106,7 @@ Framework.GetItem = function(src, item, metadata)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---Returns the count of items matching the specified name and if passed metadata from the player's inventory.
|
||||
---@description Returns the count of items matching the specified name and if passed metadata from the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param metadata table
|
||||
@@ -125,7 +124,7 @@ Framework.GetItemCount = function(src, item, metadata)
|
||||
return count
|
||||
end
|
||||
|
||||
---Returns boolean if the player has the specified item in their inventory.
|
||||
---@description Returns boolean if the player has the specified item in their inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@return boolean
|
||||
@@ -134,7 +133,7 @@ Framework.HasItem = function(src, item)
|
||||
return getCount > 0
|
||||
end
|
||||
|
||||
---Returns the entire inventory of the player as a table.
|
||||
---@description Returns the entire inventory of the player as a table.
|
||||
---@param src number
|
||||
---@return table | nil
|
||||
Framework.GetPlayerInventory = function(src)
|
||||
@@ -153,7 +152,7 @@ Framework.GetPlayerInventory = function(src)
|
||||
return repackedTable
|
||||
end
|
||||
|
||||
---Adds the specified metadata key and number value to the player's data.
|
||||
---@description Adds the specified metadata key and number value to the player's data.
|
||||
---@param src number
|
||||
---@param metadata string
|
||||
---@param value string
|
||||
@@ -165,7 +164,7 @@ Framework.SetPlayerMetadata = function(src, metadata, value)
|
||||
return true
|
||||
end
|
||||
|
||||
---Gets the specified metadata key to the player's data.
|
||||
---@description Gets the specified metadata key to the player's data.
|
||||
---@param src number
|
||||
---@param metadata string
|
||||
---@return string | boolean | nil
|
||||
@@ -176,7 +175,7 @@ Framework.GetPlayerMetadata = function(src, metadata)
|
||||
return playerData.metadata[metadata] or false
|
||||
end
|
||||
|
||||
---Adds the specified value to the player's stress level and updates the client HUD.
|
||||
---@description Adds the specified value to the player's stress level and updates the client HUD.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -190,7 +189,7 @@ Framework.AddStress = function(src, value)
|
||||
return newStress
|
||||
end
|
||||
|
||||
---Removes the specified value from the player's stress level and updates the client HUD.
|
||||
---@description Removes the specified value from the player's stress level and updates the client HUD.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -204,7 +203,7 @@ Framework.RemoveStress = function(src, value)
|
||||
return newStress
|
||||
end
|
||||
|
||||
---Adds the specified value from the player's hunger level.
|
||||
---@description Adds the specified value from the player's hunger level.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -218,7 +217,7 @@ Framework.AddHunger = function(src, value)
|
||||
return newHunger
|
||||
end
|
||||
|
||||
---Adds the specified value from the player's thirst level.
|
||||
---@description Adds the specified value from the player's thirst level.
|
||||
---@param src number
|
||||
---@param value number
|
||||
---@return number | nil
|
||||
@@ -232,7 +231,7 @@ Framework.AddThirst = function(src, value)
|
||||
return newThirst
|
||||
end
|
||||
|
||||
---This will return the players hunger level.
|
||||
---@description This will return the players hunger level.
|
||||
---@param src number
|
||||
---@return number | nil
|
||||
Framework.GetHunger = function(src)
|
||||
@@ -243,7 +242,7 @@ Framework.GetHunger = function(src)
|
||||
return math.floor((newHunger) + 0.5) or 0
|
||||
end
|
||||
|
||||
---This will return a boolean if the player is dead or in last stand.
|
||||
---@description This will return a boolean if the player is dead or in last stand.
|
||||
---@param src number
|
||||
---@return boolean|nil
|
||||
Framework.GetIsPlayerDead = function(src)
|
||||
@@ -253,7 +252,7 @@ Framework.GetIsPlayerDead = function(src)
|
||||
return playerData.metadata.isdead or false
|
||||
end
|
||||
|
||||
---This will revive a player, if the player is dead or in last stand.
|
||||
---@description This will revive a player, if the player is dead or in last stand.
|
||||
---@param src number
|
||||
---@return boolean
|
||||
Framework.RevivePlayer = function(src)
|
||||
@@ -263,7 +262,7 @@ Framework.RevivePlayer = function(src)
|
||||
return true
|
||||
end
|
||||
|
||||
---This will return the players thirst level.
|
||||
---@description This will return the players thirst level.
|
||||
---@param src number
|
||||
---@return number| nil
|
||||
Framework.GetThirst = function(src)
|
||||
@@ -274,7 +273,7 @@ Framework.GetThirst = function(src)
|
||||
return math.floor((newThirst) + 0.5) or 0
|
||||
end
|
||||
|
||||
---Returns the phone number of the player.
|
||||
---@description Returns the phone number of the player.
|
||||
---@param src number
|
||||
---@return string | nil
|
||||
Framework.GetPlayerPhone = function(src)
|
||||
@@ -284,7 +283,7 @@ Framework.GetPlayerPhone = function(src)
|
||||
return playerData.charinfo.phone
|
||||
end
|
||||
|
||||
---Returns the gang name of the player.
|
||||
---@description Returns the gang name of the player.
|
||||
---@param src number
|
||||
---@return string | nil
|
||||
Framework.GetPlayerGang = function(src)
|
||||
@@ -292,14 +291,14 @@ Framework.GetPlayerGang = function(src)
|
||||
return player.gang.name
|
||||
end
|
||||
|
||||
---This will get a table of player sources that have the specified job name.
|
||||
---@description This will get a table of player sources that have the specified job name.
|
||||
---@param job string
|
||||
---@return table
|
||||
Framework.GetPlayersByJob = function(job)
|
||||
return Framework.GetPlayerSourcesByJob(job) or {}
|
||||
end
|
||||
|
||||
---Depricated: Returns the job name, label, grade name, and grade level of the player.
|
||||
---@Deprecated Deprecated: Returns the job name, label, grade name, and grade level of the player.
|
||||
---@param src number
|
||||
---@return string | string | string | number | nil
|
||||
---@return string | string | string | number | nil
|
||||
@@ -312,7 +311,7 @@ Framework.GetPlayerJob = function(src)
|
||||
return playerData.job.name, playerData.job.label, playerData.job.grade.name, playerData.job.grade.level
|
||||
end
|
||||
|
||||
---This will return the players job name, job label, job grade label job grade level, boss status, and duty status in a table
|
||||
---@description This will return the players job name, job label, job grade label job grade level, boss status, and duty status in a table
|
||||
---@param src number
|
||||
---@return table | nil
|
||||
Framework.GetPlayerJobData = function(src)
|
||||
@@ -331,7 +330,7 @@ Framework.GetPlayerJobData = function(src)
|
||||
}
|
||||
end
|
||||
|
||||
---Sets the player's job to the specified name and grade.
|
||||
---@description Sets the player's job to the specified name and grade.
|
||||
---@param src number
|
||||
---@param name string
|
||||
---@param grade string
|
||||
@@ -342,7 +341,7 @@ Framework.SetPlayerJob = function(src, name, grade)
|
||||
return player.Functions.SetJob(name, grade)
|
||||
end
|
||||
|
||||
---This will toggle the duty status of the player.
|
||||
---@description This will toggle the duty status of the player.
|
||||
---@param src number
|
||||
---@param status boolean
|
||||
Framework.SetPlayerDuty = function(src, status)
|
||||
@@ -353,7 +352,7 @@ Framework.SetPlayerDuty = function(src, status)
|
||||
TriggerEvent('QBCore:Server:SetDuty', src, player.PlayerData.job.onduty)
|
||||
end
|
||||
|
||||
---Returns the players duty status.
|
||||
---@descriptionReturns the players duty status.
|
||||
---@param src number
|
||||
---@return boolean | nil
|
||||
Framework.GetPlayerDuty = function(src)
|
||||
@@ -364,7 +363,7 @@ Framework.GetPlayerDuty = function(src)
|
||||
return true
|
||||
end
|
||||
|
||||
---Adds the specified amount to the player's account balance of the specified type.
|
||||
---@description Adds the specified amount to the player's account balance of the specified type.
|
||||
---@param src number
|
||||
---@param _type string
|
||||
---@param amount number
|
||||
@@ -376,7 +375,7 @@ Framework.AddAccountBalance = function(src, _type, amount)
|
||||
return player.Functions.AddMoney(_type, amount)
|
||||
end
|
||||
|
||||
---Removes the specified amount from the player's account balance of the specified type.
|
||||
---@description Removes the specified amount from the player's account balance of the specified type.
|
||||
---@param src number
|
||||
---@param _type string
|
||||
---@param amount number
|
||||
@@ -388,7 +387,7 @@ Framework.RemoveAccountBalance = function(src, _type, amount)
|
||||
return player.Functions.RemoveMoney(_type, amount)
|
||||
end
|
||||
|
||||
---Returns the player's account balance of the specified type.
|
||||
---@description Returns the player's account balance of the specified type.
|
||||
---@param src number
|
||||
---@param _type string
|
||||
---@return number | nil
|
||||
@@ -400,7 +399,7 @@ Framework.GetAccountBalance = function(src, _type)
|
||||
return playerData.money[_type]
|
||||
end
|
||||
|
||||
---Adds the specified item to the player's inventory.
|
||||
---@description Adds the specified item to the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param amount number
|
||||
@@ -414,7 +413,7 @@ Framework.AddItem = function(src, item, amount, slot, metadata)
|
||||
return player.Functions.AddItem(item, amount, slot, metadata)
|
||||
end
|
||||
|
||||
---Removes the specified item from the player's inventory.
|
||||
---@description Removes the specified item from the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param amount number
|
||||
@@ -428,7 +427,7 @@ Framework.RemoveItem = function(src, item, amount, slot, metadata)
|
||||
return player.Functions.RemoveItem(item, amount, slot)
|
||||
end
|
||||
|
||||
---Sets the metadata for the specified item in the player's inventory.
|
||||
---@description Sets the metadata for the specified item in the player's inventory.
|
||||
---@param src number
|
||||
---@param item string
|
||||
---@param slot number
|
||||
@@ -441,7 +440,7 @@ Framework.SetMetadata = function(src, item, slot, metadata)
|
||||
return player.Functions.AddItem(item, 1, slot, metadata)
|
||||
end
|
||||
|
||||
---Returns a table of owned vehicles for the player. format is {vehicle = vehicle, plate = plate}
|
||||
---@description Returns a table of owned vehicles for the player. format is {vehicle = vehicle, plate = plate}
|
||||
---@param src number
|
||||
---@return table
|
||||
Framework.GetOwnedVehicles = function(src)
|
||||
@@ -456,7 +455,7 @@ Framework.GetOwnedVehicles = function(src)
|
||||
return vehicles
|
||||
end
|
||||
|
||||
---Registers a usable item with a callback function.
|
||||
---@description Registers a usable item with a callback function.
|
||||
---@param itemName string
|
||||
---@param cb function
|
||||
---@return function
|
||||
|
||||
Reference in new issue
Block a user