Skip to content

đŸ’ģ Developer API, Exports & Network Events ​

Integrate DynaDev Crafting System directly into your external jobs, target scripts, or custom minigames.


đŸ–Ĩī¸ Client Exports ​

1. OpenCrafting ​

Opens the Victorian Compendium interface programmatically.

lua
-- Option A: Open a specific station with custom jobs and categories
exports['DynaDev_crafting_system']:OpenCrafting({
    id         = 'saloon_valentine',
    name       = 'Valentine Saloon Bar',
    categories = { 'saloon', 'food' },
    jobs       = { 'saloon', 'bartender' },
})

-- Option B: Open the general portable handheld compendium
exports['DynaDev_crafting_system']:OpenCrafting(nil)

🌐 Server Network Events ​

1. Add Trade Experience (dynadev_crafting:addXP) ​

Awards trade experience points to a player in a specific category:

lua
-- Trigger from Server-Side scripts:
-- Parameters: (categoryName: string, xpAmount: number, stationId: string)
TriggerEvent('dynadev_crafting:addXP', 'smithing', 50, 'smithy_valentine')

-- Trigger from Client-Side scripts:
TriggerServerEvent('dynadev_crafting:addXP', 'smithing', 50, 'smithy_valentine')

2. Submit Station Order Programmatically ​

Submits an asynchronous cooking or brewing order directly from external scripts (e.g. an NPC order delivery):

lua
-- Parameters: (stationId: string, recipeName: string, quantity: number)
TriggerServerEvent('dynadev_crafting:orders:submit', 'smithy_valentine', 'iron_axe', 3)

đŸĒ“ Animation & Prop Attachment Engine ​

The script includes an internal animation engine supporting dual prop attachments (prop + subprop) and RedM scenarios:

  • Dual Prop Attachments: Allows an artisan to hold a hunting knife in the right hand (SKEL_R_Finger13) while simultaneously holding a piece of raw meat (p_redefleshymeat01xa) beneath the blade!
  • Upper-Body Blending (Flag 27 / 17): Allows players to craft while seated or standing naturally without freezing ped movement awkwardly.
  • Native Scenarios: Supports native RedM scenarios like WORLD_HUMAN_HAMMER_TABLE, WORLD_HUMAN_CROUCH_INSPECT, and WORLD_HUMAN_BARTENDER_CLEAN_GLASS.

Developed with passion by Dynamic Development.