PoliceCount - Returns the number of police currently online
local policeOnline = exports.lation_selling:PoliceCount()
print('There are currently' ..policeOnline.. ' police online!')
TotalSales -Returns the total number of sales a player has in a specific zone for that session
-- zoneId number: Zone ID
local totalSales = exports.lation_selling:TotalSales(zoneId)
GetData - Returns all player data or specific data about a player
local data = exports.lation_selling:GetData()
print(data.level) -- Level
print(data.rep) -- Reputation
print(data.total_sales) -- Total drugs sold
print(data.total_earned) -- Total money earned
-- If only looking for a specific data type, can also be used like so:
local playerLevel = exports.lation_selling:GetData('level')
print('Player is currently level: ' ..playerLevel)
Server
PoliceCount - Returns the number of police currently online
local policeOnline = exports.lation_selling:PoliceCount()
print('There are currently' ..policeOnline.. ' police online!')
TotalSales -Returns the total number of sales a player has in a specific zone for that session
-- source number: Player ID
-- zoneId number: Zone ID
local totalSales = exports.lation_selling:TotalSales(source, zoneId)
GetData - Returns all player data or specific data about a player
local data = exports.lation_selling:GetData(source)
print(data.level) -- Level
print(data.rep) -- Reputation
print(data.total_sales) -- Total drugs sold
print(data.total_earned) -- Total money earned
-- If only looking for a specific data type, can also be used like so:
local playerLevel = exports.lation_selling:GetData(source, 'level')
print('Player is currently level: ' ..playerLevel)
AddData - Edit/change a players stored data
-- source number: Player ID
-- amount number: Amount to add to current data
-- dataType string: level, rep, total_sales, total_earned
exports.lation_selling:AddData(source, amount, dataType)
CheckLevel - Performs a check if player needs a level up (run after adding XP)
-- source number: Player ID
-- Note: this must be ran anytime you add experience
exports.lation_selling:CheckLevel(source)