Skip to content

Configuration

Every option of Cuxial Electrician explained: config, regions, rewards, trucks and daily tasks.

Behaviour lives in shared/config.lua; regions, levels, daily tasks, trucks and clothes live in the files of the data folder. Restart the resource after any change.

General ​

OptionTypeDefaultWhat it does
debugbooleanfalsePrints traces to the console. Also enabled by setting the convar cuxial_electrician_debug to 1.
accountstring'bank'Account that receives the job payment and the daily task rewards.
jobstring | string[]'all'Who can do the job. 'all' = everyone. A job name or a list of job names ({ 'electrician' }) limits it to those jobs.
logs.convarstring'cuxial_electrician_webhook'Name of the convar that holds the Discord webhook. With the convar empty, no logs are sent.
admin.auditDaysnumber60Days the audit rows of this job are kept in cuxial_jobs_audit. Older rows are deleted once a day. Minimum 1.

Interface · ui ​

OptionTypeDefaultWhat it does
accentstring (hex)configurableAccent colour of the panel.
currency.symbolstring'$'Currency symbol shown next to amounts.
currency.localestring'en-US'Number format of the amounts (thousands and decimal separators). Use 'es-ES' for the Spanish format.

Job NPC · npc ​

OptionTypeDefaultWhat it does
coordsvector4example positionPosition and heading of the NPC that opens the panel. Change it to place the job on your map.
modelstring's_m_y_construct_01'Ped model of the NPC.
distancenumber2.0Metres at which the interaction on the NPC is offered.
menuDistancenumber6.0Metres beyond which the server refuses to open the panel.
spawnDistancenumber60.0Metres within which the NPC exists for a player.
blip.enabledbooleantruetrue shows the job blip on the map. false hides it.
blip.sprite / blip.color / blip.scalenumber643 / 3 / 0.9Look of the job blip.

The truck spawn points and the drop-off are not part of npc. If you move the NPC, move spawns and deliver in data/regions.lua as well.

Interaction and markers · target ​

OptionTypeDefaultWhat it does
distancenumber2.0Metres at which the repair option of a point is offered.
showDistancenumber25.0Metres at which a marker is drawn over the pending points. 0 = no marker.
buildOffsetnumber0.9Metres the "build platform" option is moved away from the pole, towards the player.
signalOffsetnumber0.6Metres the repair option of a traffic light is moved away from its post, towards the player.
markertablesee fileMarker over the pending points: type, scale, height, color ({ r, g, b, a }), bob, rotate.
ringtablesee fileRing drawn on the ground under street lamps and poles: type, scale, color.
iconstablesee fileFont Awesome icon of each interaction option.

Blips · blips ​

OptionTypeDefaultWhat it does
tasktable{ sprite = 354, color = 5, scale = 0.8 }Blip of each pending repair.
trucktable{ sprite = 67, color = 0, scale = 0.8 }Blip of each service truck.
delivertable{ sprite = 38, color = 29, scale = 0.8 }Blip of the drop-off.
routeColornumber38Colour of the GPS route.
routeMsnumber5000Milliseconds between recalculations of the route to the nearest pending point. Minimum 1000.

Effects · fx and signals ​

OptionTypeDefaultWhat it does
fx.asset / fx.namestring'core' / 'ent_dst_elec_fire_sp'Particle effect played on the pending points.
fx.distancenumber30.0Metres at which the sparks are shown.
fx.repeatMsnumber3000Milliseconds between two plays of the effect.
signals.distancenumber150.0Metres from a pending junction at which its traffic lights start to flicker.
signals.tickMsnumber250Milliseconds between flicker steps. Minimum 50.
signals.fixedDistancenumber1.5Metres around a repaired point within which a traffic light counts as fixed and stops flickering.

Crew · crew ​

OptionTypeDefaultWhat it does
maxPlayersnumber4Maximum members of a crew, owner included.
inviteDistancenumber8.0Maximum metres between the owner and the invited player.
inviteSecondsnumber60Seconds until an invite expires. Minimum 5.
reconnectSecondsnumber180Seconds a member who disconnects during a job keeps their seat.
splitRewardsbooleantruetrue lets the owner split the money by percentage. false removes the option and everyone receives the same.

Job rules · run ​

OptionTypeDefaultWhat it does
cooldownHoursnumber0Hours each player must wait between jobs. 0 = no cooldown.
exclusiveRegionsbooleantruetrue allows a single crew per region at a time. false lets several crews work the same region.
spawnFreeRadiusnumber6.0Metres that must be free of vehicles around each truck spawn point.

Service trucks · trucks ​

OptionTypeDefaultWhat it does
platestring'ELEC'Plate prefix, up to 4 characters. The script completes it with the job number and the truck number.
fuelnumber100.0Fuel the trucks start with, written to the fuel state of the vehicle.
keysbooleantruetrue gives the keys through cuxial_garages when that resource is running. false never gives keys.
secondFromnumber3Crew size from which a second truck is delivered.
spawnTimeoutMsnumber5000Milliseconds the server waits for each truck to be created.
minEnginenumber-3900.0Engine health below which a truck counts as destroyed.

The truck models and their extras are set in data/trucks.lua.

Repairs · repair ​

OptionTypeDefaultWhat it does
maxDistancenumber2.5Maximum metres between the player and the point for transformers, panels and traffic lights.
signalSlacknumber0.6Extra horizontal metres allowed on traffic lights.
signalHeightnumber4.0Height difference in metres allowed on traffic lights.
highDistancenumber4.5Maximum horizontal metres between the player and the point on street lamps and poles.
highHeightnumber2.0Height difference in metres allowed between the platform and the fault.
marginMsnumber500Tolerance in milliseconds on the minimum time of each minigame (data/games.lua).
lockSecondsnumber120Seconds a point stays reserved for the player repairing it. Minimum 10.
failstring'damage'What happens when a minigame is failed. 'damage' = shock animation and health loss, 'anim' = animation only, 'none' = nothing.
failDamagetable{ min = 10, max = 25 }Health lost on a failure, picked at random in this range. Only with fail = 'damage'.

The distance options are checked by the server. Raise them a little if players with high latency see repairs rejected as "too far"; do not lower them below the interaction distance in target.distance.

Ladders and platforms · rigs ​

OptionTypeDefaultWhat it does
lampRigstring'ladder'How street lamps are reached. 'ladder' = ladder taken from the truck, 'lift' = lifting platform, 'none' = repaired from the ground.
poleRigstring'lift'How utility poles are reached. Same values.
spacingnumber20.0Minimum metres between a platform and any other platform or ladder.
buildDistancenumber3.0Maximum metres from the player to the point to build, and to the foot to remove.
serveDistancenumber3.0Maximum metres between the platform or ladder and the point for it to count.
riderSlacknumber5.0Tolerance in metres on the position of a player standing on the ladder.
insideSlacknumber0.5Tolerance in metres when checking who is inside the basket.
buildMs / removeMsnumber2500 / 2500Duration of the build and remove progress bars.
ladderMsnumber1500Duration of the take, place, collect and return ladder bars.
viewDistancenumber75.0Metres within which the platform and ladder props exist for a player.

With 'ladder' the flow is: take the ladder from the truck, place it, climb, repair, climb down, collect it and return it to the truck. With 'lift' the truck must be parked at the distance set in data/rigs.lua (5 to 9 metres by default) before the platform can be built.

Drop-off · deliver ​

OptionTypeDefaultWhat it does
radiusnumber20.0Metres around the drop-off point of the region within which the trucks must be.
requireAllbooleantruetrue requires every truck to be intact. false only requires the main truck; the others, if they still exist, must be at the drop-off too.

The job is paid when a crew member presses the interaction key at the wheel of one of the trucks, with every ladder returned.

Payment · reward ​

OptionTypeDefaultWhat it does
modestring'team'How the region reward is paid. See below.
teamMultipliernumber0.64Multiplier applied to the region reward when the crew has more than one member. Used by 'team' and 'split'.
itemstable{}Items given to each member on payment: { item = 'name', count = 1, chance = 50 }. chance is a percentage. Empty = no items.
modeSoloCrew of two or more
'team'Full rewardEach member receives reward × teamMultiplier
'flat'Full rewardEach member receives the full reward
'split'Full rewardReward × teamMultiplier, divided among the crew

Every member receives the full XP of the region in all modes. Members who are disconnected at the drop-off receive nothing.

Items are only given when they exist in your inventory and the player can carry them. A missing item is reported in the server console when the resource starts.

Clothes · outfit ​

OptionTypeDefaultWhat it does
modestring'none'Clothes worn during the job. 'workwear' and 'classic' are the two sets defined in data/outfits.lua; 'none' leaves the player as they are.

The clothes only apply to the freemode male and female models. The player gets their own clothes back when the job ends.

Profile, ranking and screens ​

OptionTypeDefaultWhat it does
leaderboard.sizenumber10Entries of each ranking list. From 1 to 50.
leaderboard.cacheSecondsnumber60Seconds the ranking is cached before it is read from the database again.
history.sizenumber10Jobs shown in the history of each player. From 1 to 50.
profile.flushMsnumber30000Milliseconds between deferred saves of XP and daily tasks. Minimum 5000. Money is always paid at once.
tips.secondsnumber12Seconds a first-time tip stays on screen. Minimum 3.
finish.secondsnumber15Seconds the final summary stays on screen. Minimum 3.

Commands and keys ​

OptionTypeDefaultWhat it does
commands.<id>.namestring | falsesee CommandsName of the command. false disables it.
commands.<id>.restrictedstring'group.admin'Group allowed to use a staff command.
keystablesee CommandsDefault key of each action. Players can rebind them in the GTA key settings.

Data files ​

The files in data are meant to be edited. The values they ship with are examples: change them to fit your map and your economy.

FileWhat it holds
data/regions.luaRegions: id, label, minLevel, reward (money, xp), tasks, spawns and deliver.
data/points.luaCoordinates of every repair point per region, and the traffic light models that flicker.
data/levels.luaXP needed to go from each level to the next. The maximum level is the number of entries plus one.
data/daily.luaDaily tasks and the hours between resets.
data/trucks.luaTruck models and vehicle extras.
data/rigs.luaModels and measurements of the platform and the ladder.
data/outfits.luaClothing sets per mode and sex.
data/games.luaMinigame of each kind of point and its parameters.
data/guide.luaCards of the guide tab.

Regions ​

FieldWhat it does
idStable number of the region. The database stores it; do not reuse or renumber it.
labelLocale key with the name of the region.
minLevelLevel every member of the crew needs.
reward{ money, xp } per member, before reward.mode is applied.
tasksAmount of each kind of repair, picked at random between min and max and capped by the points available. Kinds: trafo, panel, lamp, junction, pole. A junction brings its transformer and its traffic lights.
spawnsSpawn points of the trucks (vec4), in order. The server uses the first free ones.
deliverDrop-off point of the trucks (vec3).

Daily tasks ​

Each entry of data/daily.lua has an id, a label, a kind, a goal and the xp and money paid on completion. resetHours is the number of hours between resets, counted from each player's last reset.

kindCounts
'repairs'Repairs made by the player
'runs'Jobs delivered
'money'Money earned on delivery
'team'Jobs delivered in a crew of two or more

Common changes ​

Limit the job to a profession ​

shared/config.lua
lua
job = { 'electrician' },

Use the platform on street lamps too ​

shared/config.lua
lua
rigs = {
    lampRig = 'lift',
    poleRig = 'lift',
    -- ...
},

Pay the full reward to every member ​

shared/config.lua
lua
reward = { mode = 'flat', teamMultiplier = 0.64, items = {} },

Give an item on payment ​

shared/config.lua
lua
reward = {
    mode = 'team',
    teamMultiplier = 0.64,
    items = {
        { item = 'water', count = 1, chance = 50 },
    },
},

Rename the texts ​

The names of the regions, the notifications and the interface texts are in locales/en.json and locales/es.json. Edit the value, never the key.

© Cuxial