pScripts
  • INFORMATION
    • FiveM Asset Escrow System
    • Assets Updates
    • Discord Roles
  • Assets & Guides
    • 👨‍⚖️DOJ Job
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 💻DOJ MDT
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 🌿Weed Plants
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 🚗Car Sale Job
      • 👋Installation Guide
      • ⚙️Config File
      • Client Exports
      • Server Exports
    • 📙Job Core
      • ⚙️Config File
      • Exports
    • 👮Police Job
      • 👋Installation Guide
      • ⚠️Common Issues
      • ⁉️Setup Server
      • ⚙️Config Files
      • Client Exports
        • Bodycam
        • Evidence System
        • Duty GPS
        • Interactions
        • Jail System
        • Police Objects
        • Speed Camera
        • Manage Traffic
        • Misc
      • Server Exports
        • Evidence System
        • Interactions
        • Jail System
        • Misc
    • 💻Police MDT
      • ⁉️Setup Server
      • ⚙️Config File
      • Client Exports
      • Server Exports
      • Dispatch System
    • 🚑Ambulance Job
      • 👋Installation Guide
      • ⁉️Setup Server
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 💻Ambulance MDT
      • 👋Installation Guide
      • ⚙️Config File
      • Exports and Events
      • Dispatch System
    • 🛠️Mechanic Job
      • ⚙️Config Files
      • Mileage System
      • Nitro System
      • Lifters System
      • Misc
    • 💻Mechanic MDT
      • ⚙️Config File
      • Exports
      • Dispatch System
      • Licenses System
    • 💵Fleeca Robbery
      • 👋Installation Guide
      • ⚙️Config File
    • ⌚Jewelry Robbery
      • 👋Installation Guide
      • ⚙️Config File
    • 💇Appearance
      • ⚙️Config Files
      • Client Exports
    • 👀Hints
      • Exports
    • 👋Helper
      • Exports
    • 🔧Tuning Menu
      • Exports and Events
      • ⚙️Config Files
    • 🆔Documents
      • ⚙️Config File
      • Exports and Events
    • 📱Phone
      • ⤵️INSTALLATION
      • ⚙️CONFIG FILES
      • 📃FEATURES
      • 📱APPS
      • 📇SIM CARDS
      • 📳NOTIFICATIONS
      • 📨MESSAGES
      • 🚘GARAGES
      • 🪙CRYPTO
      • 🔪DARK CONNECT
      • ⌨️FUNCTIONS
      • 🌎LANGUAGE
      • ⚠️COMMON ISSUES
    • 🪙Casino Games
      • 🎰Slot Machine
      • 🏐Roulette
      • ♣️Poker
    • 💻GCT
      • 📨EXPORTS
    • 💻Civil MDT
      • ⤵️INSTALLATION
      • 📱APPS
      • 🏎️BOOSTING
      • 🏅ACHIEVEMENTS
      • ⚠️COMMON ISSUES
Powered by GitBook
On this page
  • getPlayerStats
  • addReputation
  • removeReputation
  • getReputation
  • addSellAbility
  • removeSellAbility
  1. Assets & Guides
  2. Weed Plants

Server Exports

Here you will find the list of usable exports for Weed Plants, you can use them if you have basic or advanced programming knowledge, we do not recommend using these if you do not have such knowledge.

REMEMBER ABOUT CLIENT SIDE AND SERVER SIDE IN CHOOSING EXPORT!


getPlayerStats

With following export you can get player statistics and use some functions.

exports['p_plants']:getPlayerStats(identifier)
  • identifier: string

    • Identifier of existing player

Return:

  • identifier: string

  • reputation: table<zoneName, {exp: number, level: number}>

  • sellAbility: {exp: number, level: number}

  • drugsSold: number

  • earnings: number

  • addReputation: function

  • removeReputation: function

  • getReputation: function

  • addSellAbility: function

  • removeSellAbility: function


addReputation

Example of usage

local identifier = 'char:123456789' -- replace with existing player identifier
local player = exports['p_plants']:getPlayerStats(identifier)
if player then
   local zoneName = 'GroveStreet'
   local amount = 10
   player.addReputation(zoneName, amount)
end

removeReputation

Example of usage

local identifier = 'char:123456789' -- replace with existing player identifier
local player = exports['p_plants']:getPlayerStats(identifier)
if player then
   local zoneName = 'GroveStreet'
   local amount = 10
   player.removeReputation(zoneName, amount)
end

getReputation

Example of usage

local identifier = 'char:123456789' -- replace with existing player identifier
local player = exports['p_plants']:getPlayerStats(identifier)
if player then
   local zoneName = 'GroveStreet'
   local reputation = player.getReputation(zoneName)
   print(reputation.level, reputation.exp)
end

addSellAbility

Example of usage

local identifier = 'char:123456789' -- replace with existing player identifier
local player = exports['p_plants']:getPlayerStats(identifier)
if player then
   local amount = 10
   player.addSellAbility(amount)
end

removeSellAbility

Example of usage

local identifier = 'char:123456789' -- replace with existing player identifier
local player = exports['p_plants']:getPlayerStats(identifier)
if player then
   local amount = 10
   player.removeSellAbility(amount)
end
PreviousClient ExportsNextCar Sale Job

Last updated 1 month ago

🌿