Zyke ResourcesDocumentation

Exports & Events

All exports and events available to integrate this resource into others.

#Server Sided Exports

#Adding Blueprints

To craft blueprint-locked items, you must first acquire blueprints for that specific craft. Use this export in other resources to give yourself the blueprint.

Example:

---@param source integer @ The server ID for the target
---@param blueprint string @ Blueprint (item name) you want to add
---@param random boolean @ If set to true, it will randomly choose a valid blueprint
---@return string @ Returns the blueprint chosen, nil if none
exports["zyke_crafting"]:AddBlueprint(source, blueprint, random)

-- Specific blueprint example:
exports["zyke_crafting"]:AddBlueprint(source, "weapon_snspistol")

-- Random blueprint example:
exports["zyke_crafting"]:AddBlueprint(source, nil, true)

-- Give a blueprint with 10 uses (overrides config)
exports["zyke_crafting"]:AddBlueprint(playerId, "weapon_snspistol", false, 10)

-- Give a random blueprint with 1 use
exports["zyke_crafting"]:AddBlueprint(playerId, nil, true, 1)

-- Give a blueprint with infinite uses (overrides a finite config)
exports["zyke_crafting"]:AddBlueprint(playerId, "armor", false, -1)