Exports & Commands

The giveBlueprint Export

Function Signature

exports.lvs_crafting:giveBlueprint(playerId, recipeName, label)

Parameters

  • playerId (number): Server ID of the target player

  • recipeName (string): Recipe identifier from Config.Recipes

  • label (string): Display label for the blueprint

Example Usage

-- Give a specific recipe blueprint
exports.lvs_crafting:giveBlueprint(playerId, 'lvs_stock_brakes', 'Stock Brakes Blueprint')

-- Give a shared blueprint (if recipe uses blueprint.name = 'brake_blueprint')
exports.lvs_crafting:giveBlueprint(playerId, 'brake_blueprint', 'Brake System Blueprint')

Important Notes

  • The function checks if the player can carry the item before giving it

  • Blueprint metadata is automatically created with durability = 100

  • The recipeName must exist in Config.Recipes

  • If the recipe has blueprint.name, that name is used; otherwise, the recipe name itself is used

Admin Command

An admin command is already registered:


Commands

Built-in Commands

Admin Only:

Gives a blueprint to a player.

  • playerId: Target player server ID

  • recipeName: Recipe identifier from Config.Recipes

  • label: Display name (optional, uses recipe label if empty)

Last updated