Exports

Client

GetPlayerData() - Get all or some of player's data

local data = exports.lation_weed:GetPlayerData()
print(data.level) -- Level
print(data.exp) -- Experience
print(data.plants_searched) -- Total plants searched
print(data.plants_grown) -- Total plants grown/harvested
print(data.bud_produced) -- Total bud received from harvesting
print(data.joints_rolled) -- Total joints rolled
print(data.weed_bagged) -- Total weed bagged

-- If only looking for a specific data type, can also be used like so:
local playerLevel = exports.lation_weed:GetData('level')
print('Player is currently level: ' ..playerLevel)

OpenShop() - Opens the Smoke on the Water supply shop

exports.lation_weed:OpenShop()

Server

AddPlayerData(source, type, amount) - Add new data to player

-- source: Player ID
-- type: Data type to add ('level', 'exp', 'plants_searched', etc)
-- amount: Amount (number) to add
exports.lation_weed:AddPlayerData(source, 'exp', 100)
-- Adds 100XP to players experience

Last updated