arrow-down-left-and-arrow-up-right-to-centerexports

File: shared/commands.lua

The resource exposes several exports that can be called from other resources on both server and client sides.

Server-side exports

GetGardenerStats(source)

Returns the full stats object for a player.

local stats = exports['koja-lawnmower']:GetGardenerStats(playerSource)

Returns:

{
    level = { currentLevel, currentXP, maxXP },
    skillpoints = 0,
    skills = {},
    history = {
        logs = {},
        totalEarnings = 0,
        totalMissions = 0
    }
}

Returns nil if the player is not found.

IsOnGardenerMission(source)

Checks whether a player is currently participating in any active gardener mission (as owner or party member).

GetGardenerParty(source)

Returns the party data for the player's current party, or nil if they are not in one.

StartGardenerMission(source, missionId)

Programmatically starts a mission for a player.

Client-side exports

All client exports internally call the server via callbacks and return the result synchronously (using Citizen.Await).

GetGardenerStats()

Same return format as the server version, but no source parameter needed.

IsOnGardenerMission()

GetGardenerParty()

StartGardenerMission(missionId)

Usage example