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 IDlocal 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) -- Levelprint(data.rep) -- Reputationprint(data.total_sales) -- Total drugs soldprint(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 IDlocal 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) -- Levelprint(data.rep) -- Reputationprint(data.total_sales) -- Total drugs soldprint(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_earnedexports.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 experienceexports.lation_selling:CheckLevel(source)