Skip to content

twinded_collect

A versatile collection and farming script for RedM. Supports position-based and model-based (native world objects) collection with job restrictions, custom animations, attached props, and money rewards.

Dependencies

ResourceRequiredNotes
twinded_libsYesFree shared library

Compatibility

Cross-framework — works with VORP, RSG, QBCore RedM, QRCore, RedEM:RP, RPX, TPZ-CORE, and FRP. Framework is auto-detected by twinded_libs.

Installation

bash
ensure twinded_libs
ensure twinded_collect

Config Files

FileDescription
settings.luaMain settings, collection points, model-based collection
lang.luaTranslation strings
progressbar.luaCustom progress bar handler (when Config.ProgressBar = 'custom')
webhook.luaCustom webhook handler (when Config.Webhook.type = 'custom')

See the Configuration guide for how to override these files.

Configuration Reference

settings.lua

OptionTypeDefaultDescription
Config.ProgressBarstring"default"Progress bar system. 'default' uses the built-in twinded_libs bar, 'custom' uses your handler in progressbar.lua
Config.InteractionDistancenumber2.0Maximum distance (meters) to interact with a collection point
Config.PropSpawnDistancenumber30.0Distance (meters) at which dynamic props spawn
Config.PropDespawnDistancenumber50.0Distance (meters) at which dynamic props despawn
Config.PropCheckIntervalnumber2000Interval (milliseconds) to check player distance for prop streaming
Config.ModeleDetectionRadiusnumber1.75Radius (meters) for detecting model-based collection objects
Config.ModeleCooldownnumber5000Cooldown (milliseconds) between model-based collections per object
Config.Webhook.typestring"discord"'discord' for built-in Discord embeds, 'custom' for your own handler
Config.Webhook.urlstring""Discord webhook URL (only used with 'discord' type)

Collection Point Fields

Each entry in Config.Collect:

FieldTypeDescription
namestringDisplay name (used for blip label)
blipstring or nilBlip sprite identifier, or nil to hide from map
blipScalenumberBlip size on the map (default: 0.6)
labelstringText shown on the interaction prompt
itemstable or nilItems to give: { { item = "name", min = 1, max = 3 } }
moneytable or nilMoney reward instead of items: { amount = 0.3, type = "cash" } ("cash" or "gold")
animationtableAnimation config: { dict = "...", anim = "...", time = 10000 } (time in ms)
objecttable or nilProp attached to player during animation: { name, offset = { male = {x,y,z,rx,ry,rz}, female = {...} }, bone }
jobstable or nilAllowed jobs (nil or empty = everyone)
positionstableList of coordinates: { { x, y, z }, ... }
propstring or nilStatic prop model to spawn at each position

Model-Based Collection

Each entry in Config.CollectModel:

FieldTypeDescription
labelstringText shown on the interaction prompt
modelstableList of model hashes to detect (backtick syntax)
itemstableItems to give: { { item = "name", min = 1, max = 3 } }
animationtableAnimation config: { dict = "...", anim = "...", time = 3100 }
jobstable or nilAllowed jobs (nil or empty = everyone)

progressbar.lua

Only used when Config.ProgressBar = 'custom'. Handle the event:

lua
RegisterNetEvent('twinded_collect:customProgressBar', function(anim_data, time, items, money, collect_index, collect_type)
    -- Start your progress bar here
end)

Features

  • Position-based collection — Define spots on the map with coordinates
  • Model-based collection — Harvest native world objects (plants, cacti, etc.) by proximity
  • Job restrictions — Restrict collection points to specific jobs
  • Custom animations — Per-collection-point animation with optional held props (axe, pickaxe, pan...)
  • Money rewards — Award cash or gold instead of items
  • Dynamic prop streaming — Props spawn/despawn based on player distance
  • Webhook logging — Discord logging or custom handler
  • Rate limiting — Server-side anti-exploit protection

Troubleshooting

ProblemSolution
Script doesn't startMake sure twinded_libs is started before twinded_collect
No blips on mapCheck that blip is set in collection point config (not nil)
Can't interactVerify Config.InteractionDistance and player job matches jobs list
Props not spawningCheck Config.PropSpawnDistance and prop field in collection config
Items not givenVerify item names match your inventory database exactly

Premium RedM Scripts — Multi-Framework