> For the complete documentation index, see [llms.txt](https://5scripts-1.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://5scripts-1.gitbook.io/docs/assets/5s_gathering/functions.md).

# Functions

### Server Side Exports

#### 1. `createCustomOre`

* **createCustomOre(ore, coords, respawn)**
  * Creates a custom ore mining location at specified coordinates.
  * **Arguments:**
    * `ore` *(string)*: Name of the ore type (must exist in Config.ores).
    * `coords` *(vector3)*: World coordinates where the ore should be placed.
    * `respawn` *(boolean)*: Whether the ore should respawn after being mined.
  * **Returns:** None (void function).
  * **Usage:** Allows other resources to dynamically create mining locations.
  * **Example:**

    ```lua
    -- Create a gold ore at specific coordinates that respawns
    exports['5s_gathering']:createCustomOre('gold', vector3(100.0, 200.0, 30.0), true)

    -- Create a copper ore that doesn't respawn
    exports['5s_gathering']:createCustomOre('copper', vector3(150.0, 250.0, 35.0), false)
    ```
  * **Notes:**
    * The ore type must be defined in `Config.ores` or the function will print an error.
    * A random model from the ore's model list will be selected automatically.
    * Each custom ore gets a unique ID for tracking purposes.
    * All clients will be notified of the new ore location automatically.

***

> Use these exports to integrate the 5s\_gathering system with your own resources and create dynamic mining experiences.
