I welcome you CFX community!
Today I present to you the welding job system! This system provides accessibility for all frameworks (ESX, QBCore, Standalone), huge editing capabilities using a configuration file, unique design. Iām sure you and your players will love it!
This system includes a nice user interface, a convenient configuration file, the ability to configure the entire resource and clear functionality.
Demonstration of the system:
Example of a configuration file:
Configuration files
--/*
-- āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
-- āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
-- āāāāāāā¦āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
-- āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
-- āāāāāāā¦āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
-- āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā*/
Config = {}
--If ESX = false and QBCore = false, then Standalone will turn on
--Are you using ESX?
Config.UseESX = true
--Enable this if ESX throws an error: Used the getSharedObject Event, this event no longer exists!
Config.UseESX_lib = false
--Are you using QBCore?
Config.UseQBCore = false
--Are you using Standalone?
Config.UseStandalone = false
--Your own export to get the player's job
Config.StandaloneJobCheckExport = nil
--Interaction Button
Config.JobOpenButton = 38
--Use the command to start/end the job
Config.useCommandStartEndJob = false
Config.commandStartJob = "burJobWeldingStart"
Config.commandEndJob = "burJobWeldingEnd"
--The ability to embed your own exports to hide the hud
Config.useHudOffOnEvents = true
function hudOnEvent()
DisplayRadar(true)
--exports.Burevestnik_hud:Burevestnik_hud_on() -- Uncomment if you use Burevestnik_HUD system (https://burevestnik.tebex.io/package/5371893)
end
function hudOffEvent()
DisplayRadar(false)
--exports.Burevestnik_hud:Burevestnik_hud_off() -- Uncomment if you use Burevestnik_HUD system (https://burevestnik.tebex.io/package/5371893)
end
function notificationInteraction(str)
SetTextComponentFormat("STRING")
AddTextComponentString(str)
DisplayHelpTextFromStringLabel(0, 0, false, -1)
end
-- If true, the custom interaction menus are activated. Pay attention to the customInteractionButtonOpen and customInteractionButtonClose functions.
Config.UseCustomInteractionButton = false
Config.BurevestnikInteractionButton = "E"
Config.BurevestnikInteractionButtonText = "Press to interact"
-- The function of opening a custom interaction menu.
function customInteractionButtonOpen()
--exports.Burevestnik_interaction_button:bur_nui_InteractionButton_open(Config.BurevestnikInteractionButton, Config.BurevestnikInteractionButtonText) -- Uncomment if you use Burevestnik Interaction Button (https://forum.cfx.re/t/free-standalone-interaction-button/4860169)
end
-- The function of closing the custom interaction menu.
function customInteractionButtonClose()
--exports.Burevestnik_interaction_button:bur_nui_InteractionButton_close() -- Uncomment if you use Burevestnik Interaction Button (https://forum.cfx.re/t/free-standalone-interaction-button/4860169)
end
Config.useHelpNotificationBottom = true
function HelpNotificationBottom(text)
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(text)
EndTextCommandThefeedPostTicker(true, true)
end
-- The reward you will receive for completing the stage
Config.collectingReward = 5
receiveReward = function(source)
if Config.UseESX then
local player = ESX.GetPlayerFromId(source)
player.addMoney(Config.collectingReward)
end
if Config.UseQBCore then
local player = QBCore.Functions.GetPlayer(source)
player.Functions.AddMoney('cash', Config.collectingReward, "Bank depost")
end
end
Config.Job = {
{
interactionDistance = 2.0, --Distance for interaction with the job.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 643, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 16, --Blip color.
blipText = "Welding job", --Blip text.
UseMarkers = true, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 100, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the job. If "all", then everyone can interact with the job.
locations = {--job location
vector3(140.2780, -379.3910, 42.2570),
},
taskConfig = {
interactionDistance = 2.0, --Distance for interaction with the job.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 515, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 2, --Blip color.
blipText = "Welding point", --Blip text.
UseMarkers = true, --Do you want to use a marker ?
MarkerType = 32, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 100, --Marker colour A
animationName = "WORLD_HUMAN_WELDING", --Animation scenario
randomLocations = false, --If true, the locations will appear in random order
locations = { --Locations of interaction with job stages
vector4(122.4785, -342.7798, 42.9761, 336.7113),
vector4(91.1636, -364.2920, 42.2033, 347.3041),
vector4(79.6799, -343.3209, 42.5555, 341.0544),
vector4(79.5056, -342.4770, 55.5083, 290.6024),
vector4(93.2959, -331.9158, 55.5084, 355.0353),
vector4(108.5709, -346.8056, 55.4968, 257.3882),
vector4(118.9415, -350.9923, 55.4968, 249.6470),
vector4(106.8514, -357.5551, 55.4968, 79.4926),
vector4(99.0775, -376.1406, 55.4968, 157.3873),
vector4(92.1583, -360.9039, 67.1443, 187.1316),
vector4(89.4724, -371.8287, 67.3128, 127.5072),
vector4(109.2055, -378.9795, 67.3132, 172.5682),
vector4(52.4205, -346.3907, 67.1971, 124.0010),
vector4(61.5132, -320.5114, 67.5552, 7.4812),
vector4(87.2015, -330.8725, 75.5615, 35.8978),
},
}
},
}
--Translation config
Config.Translation = {
['menu'] = 'Press ~INPUT_CONTEXT~ to ~g~interact',
['noaccess'] = '~r~You dont have access!',
['collected'] = '~g~You have received a reward!',
['jobstart'] = '~g~You got a job!',
['jobquit'] = '~y~You quit your job!',
['translationText1'] = 'Weld', -- | burevestnik.tebex.io
['translationText2'] = 'the sheets',
['translationText3'] = 'Use a welding machine to weld two sheets of metal',
['translationText4'] = 'Move the mouse to move the welding machine',
}
--Exports
--exports.Burevestnik_welding_job:Burevestnik_job_welding_start() --Exporting to start a job
--exports.Burevestnik_welding_job:Burevestnik_job_welding_stop() --Exporting to cancel a job
Optimization (The script consumes):
0.01 ms in a quiet state.
0.03 ms in an active state.
What does this system include:
- This system works on all versions of ESX, QBCore, as well as STANDALONE!
- Beautiful user interface!
- Support of our Dialogue system!
- Support for our free Interaction Button resource!
- The ability to enable blips on the map!
- The ability to enable markers!
- The ability to install new places of interaction!
- Incredibly customizable configuration file!
- More than 15 prepared places of interaction!
- You can completely change the user interface at will!
- Of course support, Iām ready to help you!
TOP SALES
You may also be interested in my other resources:
Code accessible | Open source: Yes \ Escrow: No - Available only: config, ui |
Subscription based | No |
Lines (approximately) | ~1000 |
Requirements | Standalone/ESX/QBCore |
Support | Yes |