# Homepage

## Welcome to ViLD Store Documentation

ViLD Store was founded by a passionate developer determined to improve the quality of FiveM scripts. Frustrated by the decline of free releases and the poor quality of many paid scripts, ViLD Store is committed to delivering high-quality, well-optimized solutions that enhance your GTA V server.

***

### What We Offer

ViLD Store specializes in custom FiveM scripts, ranging from immersive roleplay features to performance optimizations. Our goal is to provide innovative, reliable scripts that make your server stand out. We also pride ourselves on delivering excellent customer support to ensure seamless integration and a smooth experience.

***

### Customizable Solutions

Each server is unique, and our scripts are designed with flexibility in mind. With extensive configuration options, you can tailor our products to suit your server's specific needs and gameplay style.

> **Note:** Always back up your scripts before installing or updating to avoid any issues during the process.

***

### Documentation and Support

This documentation includes all the information you need to install, configure, and make the most of our scripts. Whether you’re a beginner or experienced, our guides, tips, and troubleshooting advice will help you every step of the way.

***

### Important Notice

Reselling, redistributing, or profiting from our products is strictly prohibited. Violations will result in license termination, and legal action may follow if necessary.

***

Thank you for choosing ViLD Store. We’re excited to help you create a standout experience on your server!


# Support

We understand that our documentation might not always cover everything you need, or you may have questions that require further clarification. Don't worry! Our team is here to ensure you get the help you need.

### Contact Us on Discord

For quick and direct assistance, the best way to reach us is through our Discord server. Our friendly and knowledgeable support team is always ready to assist you with any questions or concerns regarding our products. Join our Discord community today and feel free to ask for help anytime!

[Join our Discord](https://discord.gg/vild)

We’re always here to ensure you have the best possible experience with our products. Feel free to reach out to us on Discord or any of our social media channels for support and updates.


# Overview

Elevate your FiveM server with our **Dynamic Interactions Script**! 🚀

Designed for both **ESX** and **QBCore** frameworks, this script enhances player engagement by enabling seamless interactions with the game world. Players can interact with entities, objects, and vehicles, creating a more immersive experience.

Discover the powerful features below and transform your server into an interactive hub where every moment counts!\ <br>

<figure><img src="/files/dDe3YlI4Ob5pMVOxFSZo" alt=""><figcaption></figcaption></figure>

{% embed url="<https://github.com/ViLD-Store/vs_interactions>" fullWidth="false" %}


# Exports

## Interaction System Documentation

This script allows developers to add interaction options based on coordinates, entities, models, and vehicles in FiveM. Interactions are registered globally, locally, or to specific entities, peds, or vehicles, and they can also be removed dynamically.

***

### Functions

#### `addCoords`

Adds interaction options based on specific coordinates. If the coordinates are close to an already registered option, the new options are added to the existing interaction.

**Parameters:**

* **data**: A table containing the following:
  * `coords`: The vector coordinates where the interaction occurs.
  * `distance`: *(optional)* The maximum distance the interaction can be triggered (default: 2).
  * `options`: A table of interaction options.

**Usage:**

```
exports('addCoords', addCoords)
```

**Example:**

```
addCoords({ 
    coords = vector3(0, 0, 0), 
    distance = 5.0, 
    options = { 
        { 
            label = 'Interact', 
            onSelect = function() print('Hello World') end 
        } 
    } 
})
```

***

#### `addLocalEntity`

Adds interaction options for a local entity. The options are tied specifically to this entity.

**Parameters:**

* **data**: A table containing:
  * `entity`: The local entity (ID).
  * `distance`: *(optional)* The maximum distance the interaction can be triggered (default: 2).
  * `options`: A table of interaction options.

**Usage:**

```
exports('addLocalEntity', addLocalEntity)
```

**Example:**

```
addLocalEntity({ 
    entity = 12345, 
    distance = 3.0, 
    options = { 
        { 
            label = 'Inspect', 
            onSelect = function() print('Inspecting entity') end 
        } 
    } 
})
```

***

#### `addEntity`

Adds interaction options for a network entity. The interaction will be attached to the network ID of the entity.

**Parameters:**

* **data**: A table containing:
  * `netId`: The network ID of the entity.
  * `distance`: *(optional)* The maximum distance for interaction (default: 2).
  * `options`: A table of interaction options.

**Usage:**

```
exports('addEntity', addEntity)
```

**Example:**

```
addEntity({ 
    netId = 67890, 
    distance = 4.0, 
    options = { 
        { 
            label = 'Check', 
            onSelect = function() print('Checking entity') end 
        } 
    } 
})
```

***

#### `addGlobalPed`

Adds interaction options for global peds (pedestrian NPCs). These options will apply to any ped in the game within the specified distance.

**Parameters:**

* **data**: A table containing:
  * `distance`: *(optional)* The maximum distance for interaction (default: 3).
  * `options`: A table of interaction options.

**Usage:**

```
exports('addGlobalPed', addGlobalPed)
```

**Example:**

```
addGlobalPed({ 
    distance = 5.0, 
    options = { 
        { 
            label = 'Talk', 
            onSelect = function() print('Talking to ped') end 
        } 
    } 
})
```

***

#### `addGlobalVehicle`

Adds interaction options for vehicles. These interactions apply to all vehicles within the specified distance.

**Parameters:**

* **data**: A table containing:
  * `distance`: *(optional)* The maximum distance for interaction (default: 2).
  * `options`: A table of interaction options.

**Usage:**

```
exports('addGlobalVehicle', addGlobalVehicle)
```

**Example:**

```
addGlobalVehicle({ 
    distance = 3.0, 
    options = { 
        { 
            label = 'Enter Vehicle', 
            nSelect = function() print('Entering vehicle') end 
        } 
    } 
})
```

***

#### `addModel`

Adds interaction options for a specific model (e.g., a vehicle or object model). Any instance of this model within the specified distance can trigger the interaction.

**Parameters:**

* **data**: A table containing:
  * `model`: The model name.
  * `distance`: *(optional)* The maximum distance for interaction (default: 2).
  * `options`: A table of interaction options.

**Usage:**

```
exports('addModel', addModel)
```

**Example:**

```
addModel({ 
    model = 'elegy', 
    distance = 4.0, 
    options = { 
        { 
            label = 'Drive Car', 
            onSelect = function() print('Driving car') end 
        } 
    } 
})
```

***

#### `removeInteract`

Removes an interaction option based on its unique ID. This ID is generated when an interaction is added.

**Parameters:**

* **id**: The unique ID of the interaction to be removed.

**Usage:**

```
exports('removeInteract', removeInteract)
```

**Example:**

```
removeInteract(1)
```


# Overview

**✨ FiveM Dialog System Script | 2 Unique Types of Dialogs**

Take your server's roleplay and interactivity to the next level with this powerful **Dialog System Script**! Designed for maximum flexibility, this script allows you to easily integrate two unique types of dialogs into your FiveM server:

#### 🔥 **Key Features**

**1️⃣ Dynamic Text-Based Dialogs**

* Perfect for immersive roleplay scenarios.
* Supports branching dialogues, enabling players to choose responses that shape outcomes.
* Fully customizable texts to fit NPC interactions, missions, or custom scripts.
* Option to trigger events or execute commands based on player choices.

**2️⃣ Interactive Button-Based Dialogs**

* Simplify interactions with sleek and intuitive buttons.
* Great for menus, quick decisions, and utility prompts (e.g., “Yes/No,” “Accept/Decline”).
* Configurable button layouts for endless use cases.

{% embed url="<https://store.vildstore.com/package/6590154>" %}


# Exports

## Functions

**`OpenDialog`**

Opens a dialog interaction with a specified NPC or entity, allowing players to select options from a customizable menu.

**Parameters:**

* **`data`**: A table containing the following fields:
  * **`ped`**: The NPC or entity to interact with.
  * **`pedName`**: A string representing the name of the NPC displayed at the top of the dialog.
  * **`info`** *(optional)*: A descriptive text providing additional context or information about the dialog.
  * **`options`**: A table of interaction options. Each option can define an action to take when selected.

**Usage:**

```lua
exports('OpenDialog', OpenDialog)
```

**Example:**

```lua
OpenDialog({ 
    ped = GetClosestPed(5.0), -- The NPC or entity to interact with
    pedName = 'Merchant', -- The name of the NPC
    info = 'Welcome to my shop! What would you like to do?', -- Optional dialog description
    options = { 
        { 
            label = 'Buy Items', -- Text for the interaction option
            onSelect = function() 
                print('You chose to buy items!') 
            end 
        }, 
        { 
            label = 'Sell Items', 
            onSelect = function() 
                print('You chose to sell items!') 
            end 
        }, 
        { 
            label = 'Leave', 
            onSelect = function() 
                print('You left the conversation.') 
            end 
        } 
    } 
})
```


