GetPlayerData(type) - Get all or some of players latest data
local data = exports.lation_detecting:GetPlayerData()print(data.level) -- Levelprint(data.experience) -- Experienceprint(data.items_found) -- Total items foundprint(data.money_earned) -- Total money earned-- If only looking for a specific data type, can also be used like so:local playerLevel = exports.lation_detecting:GetData('level')print('Player is currently level: ' ..playerLevel)
Server
GetPlayerData(source, type) - Get all or some of players latest data
-- source: Player ID-- type: Data type (optional)local data = exports.lation_detecting:GetPlayerData(source)print(data.level) -- Levelprint(data.experience) -- Experienceprint(data.items_found) -- Total items foundprint(data.money_earned) -- Total money earned-- If only looking for a specific data type, can also be used like so:local playerLevel = exports.lation_detecting:GetData(source, 'level')print('Player is currently level: ' ..playerLevel)
AddPlayerData(source, type, amount) - Add new data to player
-- source: Player ID-- type: Data type to add ('experience', 'items_found', 'money_earned')-- amount: Amount (number) to addexports.lation_detecting:AddPlayerData(source, 'experience', 100)-- Adds 100XP to players experience