π· 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 β
ensure fx-workerβ’ Place script into your resources folder β’ Add to server.cfg β’ Restart your server β’ Automatically detects framework (VORP / RSG)
βοΈ Basic Settings β
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 β
Config.Locale = {
["en"] = {}
}β’ Multi-language support β’ Supports dynamic variables (${value}) β’ Fully customizable messages
π§ Framework System β
Framework = "VORP" or "RSG"β’ Auto-detects framework β’ Handles inventory, money, and player data β’ Unified wrapper system (FXAddItem, FXRemoveMoney, etc.)
πͺ Worker Market System β
Config.Markets = {
["BLACKWATER"] = {
coords = vector4(...)
}
}β’ Defines worker shop locations β’ Spawns NPC and stash
model = "mp_chu_rob_rathskeller_males_01"
stashModel = "p_storagecartnbx01x"β’ NPC model for worker market β’ Stash object model
blips = {
name = "Worker Shop"
}β’ Map blip system β’ Fully customizable
π― Interaction System β
Config.UseTarget = trueβ’ Supports: β’ ox_target β’ murphy_interact β’ pc_interaction
Config.Prompts = {
["market"] = {}
}β’ Prompt fallback system β’ Used if target disabled
π¦ JSON Data System β
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 β
Config.MaximumWorkerCount = 5β’ Limits worker count per player
Config.MaximumWorkerCountChars = {
[51] = 5
}β’ Overrides limit per charid
β‘ Stamina System β
Config.RechargeStamina = {
recharge = true,
rechargeTime = 10,
rechargeValue = 5.0
}β’ Workers regenerate stamina over time β’ Prevents infinite working
π Food System β
Config.Foods = {
{
item = "bread",
stamina = 25
}
}β’ Feed workers to restore stamina β’ Includes cooldown system
π Level System β
Config.Levels = {}β’ XP-based leveling system β’ Higher level = better rewards
Config.WorkTimes = {
[1] = {stamina = 1, addXP = 25}
}β’ Defines work duration β’ Controls XP gain and stamina cost
π Job System β
Config.Jobs = {
["Fisherman"] = {}
}β’ Defines worker job types β’ Each job has separate logic
items = {
{item = "fish", min = 1, max = 3}
}β’ Items worker can collect β’ Supports luck system
coords = {
{
coord = vector4(...)
}
}β’ Work locations β’ Multiple slots per job
π Animation System β
animation = function(ped)β’ Each job has custom animation β’ Includes: β’ Fishing β’ Mining β’ Lumberjack β’ Farming
π¦ Warehouse System β
Config.WareHouseLimits = {
["copper"] = 100
}β’ Limits stored items β’ Prevents overflow
π° Economy System β
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 β
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
