ev_sitanywhere

Creating Fields in EV-Gathering

This guide will walk you through the process of creating gatherable fields in the EV-Gathering system. The system allows players to gather resources by interacting with props in the game world. Each field is fully customizable, including spawn locations, props, rewards, and requirements.


Prerequisites

  1. EV-Gathering Installed: Ensure the EV-Gathering resource is installed on your server.

  2. qb-core Framework: Your server must run a compatible version of qb-core.

  3. ox_inventory: The inventory system used for item management.


Step 1: Understanding the Configuration

The Config.Gatherables table defines all gatherable fields. Each field contains settings such as props, rewards, animations, and blip information.

Example Configuration


Step 2: Adding a New Field

Step 2.1: Define the Field

  1. Open the Configuration File Open the configuration file (config.lua) of the EV-Gathering resource.

  2. Add a Gatherable Add a new entry in the Config.Gatherables table.

Field Settings Explained

Key

Description

name

Unique identifier for the field (e.g., "apple").

label

Display name for the resource (e.g., "Apple").

model

Prop model used for the field (e.g., "bkr_prop_weed_lrg_01b").

rewardItems

Table of items players can receive. Specify item, minAmount, maxAmount, and chance.

requiredItems

Items required to gather from the field (e.g., a "basket").

animation

Animation dictionary and name for the gathering action.

centerCoords

The center of the field in vector3 format.

spawnRange

Radius around the center where props will spawn.

spawnAmount

Number of props to spawn.

progressText

Text displayed during the gathering process.

progressTime

Duration of the gathering action (in milliseconds).

blip

Blip configuration for the field on the map.

Example Field Configuration


Step 3: Testing the Field

  1. Restart the Resource Restart the EV-Gathering resource to load the new configuration.

  2. Check the Map Verify that the blip for the field appears on the map (if enabled).

  3. Test Gathering Visit the field, interact with the props, and confirm the gathering process works as expected.

  4. Check Rewards Ensure that rewards are correctly added to the inventory.


Advanced Customization

Adding Custom Props

Use any prop model available in GTA V by specifying its model name in the model field.

Dynamic Rewards

Modify the rewardItems table to adjust rewards based on your server's economy.

Field Animations

Change the animation field to use different animations during gathering. For example:


Common Issues

  1. Props Not Spawning

    • Ensure the model name is correct.

    • Verify the centerCoords and spawnRange values.

  2. No Rewards Given

    • Check the rewardItems table for correct configuration.

    • Verify that required items are present in the player's inventory.

  3. Blip Not Showing

    • Ensure the blip.enabled field is set to true.

    • Verify the blip configuration settings (sprite, scale, color, etc.).


Last updated