Skip to content

πŸ‘· FX-WORKER ​

Advanced worker management system for RedM that allows players to hire workers, send them to jobs, collect resources, manage stamina, and trade workers dynamically.


πŸ“¦ Installation ​

bash
ensure fx-worker

β€’ Place script into your resources folder β€’ Add to server.cfg β€’ Restart your server β€’ Automatically detects framework (VORP / RSG)


βš™οΈ Basic Settings ​

lua
Config.Language = "en"
Config.UseSql = true
Config.UseTarget = true

β€’ Language β†’ UI language system β€’ UseSql β†’ true = SQL / false = JSON system β€’ UseTarget β†’ enables target system (ox_target, etc.)


🌐 Locale System ​

lua
Config.Locale = {
  ["en"] = {}
}

β€’ Multi-language support β€’ Supports dynamic variables (${value}) β€’ Fully customizable messages


🧠 Framework System ​

lua
Framework = "VORP" or "RSG"

β€’ Auto-detects framework β€’ Handles inventory, money, and player data β€’ Unified wrapper system (FXAddItem, FXRemoveMoney, etc.)


πŸͺ Worker Market System ​

lua
Config.Markets = {
  ["BLACKWATER"] = {
    coords = vector4(...)
  }
}

β€’ Defines worker shop locations β€’ Spawns NPC and stash


lua
model = "mp_chu_rob_rathskeller_males_01"
stashModel = "p_storagecartnbx01x"

β€’ NPC model for worker market β€’ Stash object model


lua
blips = {
  name = "Worker Shop"
}

β€’ Map blip system β€’ Fully customizable


🎯 Interaction System ​

lua
Config.UseTarget = true

β€’ Supports: β€’ ox_target β€’ murphy_interact β€’ pc_interaction


lua
Config.Prompts = {
  ["market"] = {}
}

β€’ Prompt fallback system β€’ Used if target disabled


πŸ“¦ JSON Data System ​

json
workers.json
stash.json
sales.json
workersInformation.json

β€’ Stores all worker data β€’ stash.json β†’ warehouse system β€’ sales.json β†’ worker marketplace β€’ workersInformation.json β†’ names & models


πŸ‘· Worker System ​

lua
Config.MaximumWorkerCount = 5

β€’ Limits worker count per player


lua
Config.MaximumWorkerCountChars = {
  [51] = 5
}

β€’ Overrides limit per charid


⚑ Stamina System ​

lua
Config.RechargeStamina = {
  recharge = true,
  rechargeTime = 10,
  rechargeValue = 5.0
}

β€’ Workers regenerate stamina over time β€’ Prevents infinite working


🍞 Food System ​

lua
Config.Foods = {
  {
    item = "bread",
    stamina = 25
  }
}

β€’ Feed workers to restore stamina β€’ Includes cooldown system


πŸ“Š Level System ​

lua
Config.Levels = {}

β€’ XP-based leveling system β€’ Higher level = better rewards


lua
Config.WorkTimes = {
  [1] = {stamina = 1, addXP = 25}
}

β€’ Defines work duration β€’ Controls XP gain and stamina cost


🏭 Job System ​

lua
Config.Jobs = {
  ["Fisherman"] = {}
}

β€’ Defines worker job types β€’ Each job has separate logic


lua
items = {
  {item = "fish", min = 1, max = 3}
}

β€’ Items worker can collect β€’ Supports luck system


lua
coords = {
  {
    coord = vector4(...)
  }
}

β€’ Work locations β€’ Multiple slots per job


🎭 Animation System ​

lua
animation = function(ped)

β€’ Each job has custom animation β€’ Includes: β€’ Fishing β€’ Mining β€’ Lumberjack β€’ Farming


πŸ“¦ Warehouse System ​

lua
Config.WareHouseLimits = {
  ["copper"] = 100
}

β€’ Limits stored items β€’ Prevents overflow


πŸ’° Economy System ​

lua
gold = { min = 1000, max = 1000 }

β€’ Worker price system β€’ Supports gold & cash


πŸ”„ Worker Lifecycle ​

β€’ Hire worker β€’ Send to work β€’ Consume stamina β€’ Generate items β€’ Store in warehouse β€’ Recall worker β€’ Sell worker


πŸ”” Notification System ​

lua
Notify({
  text = "Message"
})

β€’ Supports VORP / RSG / REDEMRP β€’ Handles server & client notifications


⚠️ Important Notes ​

β€’ JSON files must exist β€’ Worker jobs must be configured β€’ Inventory items must match config β€’ Target system optional β€’ SQL mode must match setup


🚨 Common Issues ​

β€’ Workers not spawning β†’ wrong coords β€’ Cannot hire β†’ max worker reached β€’ Worker not working β†’ no stamina β€’ No items gained β†’ wrong job config β€’ Warehouse full β†’ limit reached


🏁 Summary ​

FX-WORKER provides:

β€’ Worker hiring system β€’ Job-based resource system β€’ Stamina & food system β€’ XP & leveling system β€’ Market & trading system β€’ Warehouse storage system β€’ Multi-framework support


Β© Fixitfy Development

⚑ Premium RedM scripts crafted with performance & quality in mind.