[VORP/RSG] MX-CollectSap

[VORP/RSG] MX-CollectSap

€14.99

Add to Basket

MX-collectsap (MX-FarmSap)

Discord: Mexicano Scripts
Preview: https://youtu.be/6aOrJsbG5cY
Tebex: https://mexicano-scripts.tebex.io/category/3257636

MX-collectsap is a RedM script for collecting tree sap. Players use ox_target on supported tree models to place a bucket, wait while it fills, then collect rewards. The resource targets VORP and RSG (auto-detection via vorp_inventory / rsg-core). Server logic and events use the prefix mx_farmsap. —

What it does

Players need a hatchet and an empty bucket in inventory. Outside restricted towns, they can place one bucket per character; the prop persists in MySQL through oxmysql. A timer (Config.BucketFillTime, default five minutes) controls when collection is allowed. After pickup, the server rolls a chance (Config.ChanceRange and Config.Items) to grant sap or related items. The same tree position enters a cooldown so it cannot be spammed. Floating text shows time remaining or when the bucket is ready. Translations live in shared/translation.lua; set Lang in config.lua (e.g. English, Portugues_BR). —

Requirements

  • oxmysql, ox_lib, ox_target
  • vorp_core + vorp_inventory or rsg-core + rsg-inventory
  • Items registered for bucket, axe, and rewards (names must match config.lua or *VORP / *RSG overrides).

Installation

  1. Import sql/placements.sql to create mx_farmsap.
  1. If you already have the table with charidentifier as INT, run sql/migration_rsg.sql so the column is VARCHAR(64) (needed for stable IDs on both frameworks).
  1. Align item names in config.lua (bucket defaults to sap, axe to hatchet — adjust to your server).
  1. In server.cfg, start dependencies first, then e.g. ensure MX-collectsap using your folder name.

Configuration (essentials)

  • Config.Framework: auto, vorp, or rsg.
  • Config.BucketFillTime / Config.CoolDown: fill duration and per-tree cooldown (seconds).
  • Config.TownRestrictions: towns where placement is blocked (native town check).
  • Config.Trees: long list of model names for valid trees — add/remove only if you know the prop names.
  • Config.Items: reward lines with name, label, chance, amount; optional Config.ItemsVORP / Config.ItemsRSG for split setups.

Tweak PromptDistance, BucketPlacementDistance, and LabelDrawDistance if prompts or the 3D label feel too close or far. —

Behaviour notes

Only one bucket placement is stored per character in the database. Reconnecting reloads the bucket client-side. The server removes the bucket item when placed and grants items only when the player collects after the timer; inventory full and failed chance paths are handled with notify messages. If placement fails with “invalid character” errors, check database column types and that the framework returns a valid character id. —

Troubleshooting (short)

  • No target on trees: ensure ox_target is running and the tree model is listed in Config.Trees.
  • Wrong town blocking: verify town names in townRestrictions match your map expectations.
  • No rewards: check ChanceRange, item chance values, and carry limits in your inventory.