INSTALLATION
Read very well and follow all the steps below. If you find any error or have any doubt open a ticket.
1. DOWNLOAD
The first step is to download the product we have just purchased. To do this we will go to our KEYMASTER account and search for "Buty-InfiniteJobs".
2. DEPENDENCIES AND INSTALLATION
To install it add the resource to your scripts folder and put the following in your SERVER.CFG:
ensure Buty-Clothes -- Essential to the functioning of the Uniform system.
ensure BCall_progress -- Or the Progress Bar of your choice.
ensure Buty_InfiniteJobsNEWUI
There are 2 dependencies, although one of them is not mandatory:
Buty-Clothes and BCall_progress (You can also configure yours in config_function.lua).
The Buty-Clothes Script is MANDATORY to install. It is the script that allows us to put uniforms, compatible with ALL clothing systems (illenium-appareance, qb-clothing etc.).
You can download it for FREE at: https://github.com/ButyCall/Buty-Clothes
Either ours (BCall_progress) or one of your choice that you will have to set in the CONFIG_FUNCTION.LUA and you will have to ensure it before the script.
You can download it for FREE at: https://github.com/ButyCall/BCall_Progress
We also recommend our beautifully designed Advanced Progress Bar with lots of functions. This one has a very low price and fits very well with the aesthetics of any server:
https://butycall.tebex.io/package/5384327
You can add it to Infinite Jobs, adding the export in the config_function.lua. If you open ticket in discord, we will be happy to help.
You will also need to install the SQL in your database before starting the script, in order to save the experience of each player.
3. CONFIG
The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.
This script comes with 25 jobs already preconfigured and activated, you only have to ensured the script (and dependencies) and they will be ready.
Even so, check the CONFIG of the jobs and configure the uniforms, salaries and vehicles to your licking.
Here you will only have to configure your framework, your database and the location of the Job Center.
In addition to some extra settings, such as the type of gender that your server uses.
In UseKeys, UseFuel, UseDeleteVehicle you activate it in case you have filled some of the integrations in config_functions.
Configuration = {
framework = 'esx', -- framework "esx" or "qbcore"
trigger = 'es_extended', -- qb-core or es_extended
Mysql = 'oxmysql', -- oxmysql, mysql-async or ghmattisql
UseKeys = false,
UseFuel = false,
UseDeleteVehicle = false,
UseAppearance = false,
UseWorkUniforms = true,
NPC = {
{x = -542.96, y = -207.84, z = 37.64, h = 219.12},
--{x = -542.96, y = -207.84, z = 37.64, h = 219.12}, --> here you can add more
},
NPCmodel = "cs_barry",
Payment_type = "cash", --bank or cash
vehicleData = { -- In case you add a very large vehicle, you can change the coordinates to where the point to pick up the tool will appear.
[`rebel`] = {0, -2.0, -0.3},
[`mule`] = {0, -2.0, 0},
[`model3`] = {0, -2.0, 0},
},
Color_UI = "#9B37FF", -- Enter here the colour code in which you want the interface to appear. You will also have to change the BACKGROUND as I will explain later.
}
```
}
Target = {
UseTarget = false,
Coords = vector3(-542.96, -207.84, 37.64),
TargetExport = 'bt-target',
["Home"] = {
Text = 'WORK CENTRE',
Icon = 'fa fa-briefcase'
},
["Workclothes"] = {
[1] = {
Text = 'START WORK',
Icon = 'fa fa-user-circle-o'
},
[2] = {
Text = 'REMOVE JOB',
Icon = 'fa fa-sign-out'
}
},
["Vehicle"] = {
[1] = {
Text = 'TAKE VEHICLE',
Icon = 'fa fa-car'
},
[2] = {
Text = 'SAVE VEHICLE',
Icon = 'fa fa-car'
}
},
["Tool"] = {
[1] = {
Text = 'TAKE TOOL',
Icon = 'fa fa-wrench'
},
[2] = {
Text = 'SAVE TOOL',
Icon = 'fa fa-wrench'
}
},
["Job"] = {
Text = 'WORK',
Icon = 'fa fa-hand-rock-o'
},
["Payout"] = {
Text = 'COLLECT PAYMENT',
Icon = 'fa fa-money'
}
}
Here you can customize the pre-created jobs or create your own jobs.
πIn [1]:
In jobs =
you will put the name of the job. This will appear in the UI.
In img =
the path of the image you want for the background of the job.
In img2 =
the path of the image you want for the tool of the job. In info =
the description of the job.
πIn [2]:
In Workclothes =
add the coordinates of the markers for the players to put on the uniform.
In payout =
you will add the coordinates of the NPC who will pay the players when the job is finished.
In coordsjob =
you will add everything related to the different steps of the job:
prop =
true
if you want there to be a prop to catch orfalse
if you want to use the environment for it.propname =
the id of the prop you want to use. You can find all the props here: https://gta-objects.xyz/nameblip =
The name of the prop, which will be shown in the map blip.text =
The floating text that will serve as a warning.From here are the coordinates of all the props that the player will have to take or treat. You can put as many as you want. In
objZ=
will be the height where the prop will appear (depending on the terrain height), the default will be 0.
In getvehicle =
will be first the coordinate where will be the NPC that gives you the work vehicle, which will have the tool to use in the trunk. And also:
pedmodel =
the id of the NPC you want to use. You can find all the peds in https://docs.fivem.net/docs/game-references/ped-models/pedanim =
the id of the animation you want the NPC to do. You can find almost all animations in https://alexguirre.github.io/animations-list/nameblip =
the text of the map blip for that point.
In spawnvehicle =
are the coordinates where the vehicle will appear when the NPC gives it to you.
In vehiclename =
the id of the vehicle you want to display.
In vehicle =
true
if you want a vehicle to be needed to work and false
if you do not. Note that if you disable this, a tool will not be needed to work either, since it goes in the trunk of the vehicle.
πIn [3]:
In anim =
and anim2 =
you will have to choose the animation your player will do when picking up the prop. Whether it is sweeping, axe chopping, crouching, grabbing....
In obj =
you will have to say whether you want a tool to be used or not.
nameobj =
the id of the object to be used as a tool.objX = , objY = , objZ = , objrotX =, objrotY =, objrotZ =
are the coordinates where your tools will appear. All the tools of the 20 jobs come preconfigured, but if you want to add a new one you will have to try coordinates until it fits your character's hand (it's a bit difficult).animtime =
the time the player will spend animating with the tool.
πIn [4]:
There are two ways to handle payments:
The NORMAL WAY, which is with a mathematical formula, which is:
Pay * (level * IncreasePerLVL)
which you will only have to fill in the variables and at each level the payout will change automatically.The ADVANCED WAY, in which you can add the amount that pays manually and in an exact way, adding the amount that will pay at each level. You will have to add the levels manually and there will be no infinite levels, only what you set.
In Pay_Advanced =
To activate the ADVANCED WAY you have to set Pay_Advanced = true, and to use the normal mode you have to set false.
In Pay =
Here you will put the money you will give when the job is done.
In IncreasePerLVL =
you will set how much you want the payout to increase at each level. The mathematical formula works like this: MONEY (number set in Pay =
) multiplied by the number set in IncreasePerLVL =
+ the level you have and divided by 10.
In PayPerLVL =
Remember that if you have set true in Pay_Advanced you will have to add all levels manually.
In EXP =
You will put the experience it will give each time the job is done. The mathematical formula works like this: EXPERIENCE (number put in EXP =
) multiplied by the number put in IncreasePerLVL =
+ the level you have and divided by 10.
In GetItem =
Here you select if you want the work of items apart from the money (for example every time you cut down a tree).
ItemName =
The ITEM name.Amount =
The number of items you want it to give.
πIn [5]: Here you will choose the uniform you want your players to wear on that job. There is a section for ESX and another for QBCore, it is easy to configure, it is like most systems that use clothes.
{
[1] = {jobs = "Lumberjack", img = "./img/lumberjack.png",img2 = "./img/lumberjack2.png", info = "Help is needed with tree cutting, just cut some trees and we will pay you for it."},
[2] = {
[1] = {Workclothes = {{x = -552.8, y = 5348.68, z = 74.76, h = 61.92}, nameblip = "~h~[JOB]~h~ Work clothes"}},
[2] = {payout = {{x = -566.12, y = 5326.12, z = 72.6, h = 67.28}, pedmodel = "s_m_m_cntrybar_01", pedanim = "WORLD_HUMAN_SMOKING", nameblip = "~h~[JOB]~h~ Work Payout"}},
[3] = {coordsjob = {
prop = false,
propname = "prop_tree_olive_creator",
nameblip = "Tree",
text = "Press ~h~[E]~h~",
{ x = -554.64, y = 5511.76, z = 59.28, objZ= 2 , take = false},
{ x = -565.36, y = 5502.84, z = 57.04, objZ= 2 , take = false},
{ x = -553.12, y = 5541.24, z = 60.12, objZ= 2 , take = false}, {x = -524.16, y = 5561.68, z = 66.28, objZ= 2 , take = false},
{ x = -533.56, y = 5536.56, z = 64.4, objZ= 2 , take = false}, { x = -536.92, y = 5555.28, z = 61.48, objZ= 2 , take = false}, {x = -523.48, y = 5569.08, z = 66.04, objZ= 2 , take = false},
{ x = -506.56, y = 5564.44, z = 70.52, objZ= 2 , take = false}, { x = -575.64, y = 5526.6, z = 53.04, objZ= 2 , take = false}, {x = -588.48, y = 5496.16, z = 54.16, objZ= 2 , take = false},
}},
[4] = {
[1] = {getvehicle = {{x = -573.8, y = 5369.64, z = 69.24, h = 256.68}, pedmodel = "a_m_m_farmer_01", pedanim = "WORLD_HUMAN_AA_COFFEE", nameblip = "~h~[JOB]~h~ Work vehicle"}},
[2] = {spawnvehicle = {x = -562.64, y = 5370.08, z = 70.2, h = 346.56}},
[3] = {vehiclename = "rebel"},
[4] = {vehicle = true}
}
},
[3] = {
[1] = {anim = "melee@hatchet@streamed_core", anim2 = "plyr_front_takedown"},
[2] = {obj = true, nameobj = "w_me_hatchet", objX = 0.09, objY = 0.01, objZ = 0.0, objrotX = 300.0, objrotY = 720.0,objrotZ = 330.0},
[3] = {animtime = 5000}
},
[4] = {
[1] = {
Pay_Advanced = false,
Pay = 1550, IncreasePerLVL = 1,
PayPerLVL = {
[0] = 100,
[1] = 101,
[2] = 102,
[3] = 103,
[4] = 104,
[5] = 105,
[6] = 106,
[7] = 107,
[8] = 108,
[9] = 109,
[10] = 110,
},
},
[2] = {EXP = 50, IncreasePerLVL = 1},
[3] = {GetItem = false, ItemName = "water", Amount = 1}
},
[5] = {
['clothes'] = {
male = {
tshirt_1 = 15, tshirt_2 = 0,
torso_1 = 234, torso_2 = 19,
decals_1 = 0, decals_2 = 0,
arms = 37,
pants_1 = 9, pants_2 = 7,
shoes_1 = 12, shoes_2 = 0,
chain_1 = 0, chain_2 = 0,
helmet_1 = 5, helmet_2 = 0,
ears_1 = -1, ears_2 = 0,
bproof_1 = 0, bproof_2 = 0
},
female = {
tshirt_1 = 201, tshirt_2 = 1,
torso_1 = 167, torso_2 = 0,
decals_1 = 0, decals_2 = 0,
arms = 44,
pants_1 = 60, pants_2 = 0,
shoes_1 = 52, shoes_2 = 0,
chain_1 = -1, chain_2 = 0,
helmet_1 = -1, helmet_2 = 0,
bproof_1 = 0, bproof_2 = 0
}
},
},
},
Here are the important functions open. You will be able to set your Key System, Gasoline System, set up your notification system...
if Configuration.UseKeys then
function keys(Plate)
TriggerEvent("vehiclekeys:client:SetOwner", Plate)
end
end
if Configuration.UseFuel then
function fuel(fuelvehicle)
exports["LegacyFuel"]:SetFuel(fuelvehicle, 100)
end
end
if Configuration.UseDeleteVehicle then
function delete(deletevehicles)
exports["AdvancedParking"]:DeleteVehicle(deletevehicles)
end
end
function GiveItem(xPlayer,itemname,cantidad)
if Configuration.framework == 'esx' then
xPlayer.addInventoryItem(itemname,cantidad)
elseif Configuration.framework == 'qbcore' then
xPlayer.Functions.AddItem(itemname,cantidad)
end
end
function progress()
if Configuration.framework == 'esx' then
exports['BCall_progress']:muestra(4020, 'Preparing...')
else
exports['BCall_progress']:muestra(4020, 'Changing clothesβ¦')
end
end
function marker()
DrawMarker(25, clothes.x, clothes.y, clothes.z-0.85, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 1.0, 1.0, 1.0, 255, 0, 135, 135, false, true, 2, false, false, false, false)
end
function Blips(NPC)
for i, v in ipairs(NPC) do
v.blip = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite(v.blip, 280)
SetBlipColour(v.blip, 27)
SetBlipScale(v.blip, 0.7)
SetBlipAsShortRange(v.blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("Infinite Jobs")
EndTextCommandSetBlipName(v.blip)
end
end
function setblip(blip, nameblip)
for i, v in ipairs(blip) do
v.blip = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite(v.blip, 1)
SetBlipColour(v.blip, 50)
SetBlipScale(v.blip, 0.4)
SetBlipAsShortRange(v.blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(nameblip)
EndTextCommandSetBlipName(v.blip)
SetBlipRoute(v.blip, true)
SetBlipRouteColour(v.blip,29)
end
end
function setblip2(blip2, nameblip2)
for i, v in ipairs(blip2) do
v.blip2 = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite(v.blip2, 366)
SetBlipColour(v.blip2, 50)
SetBlipScale(v.blip2, 0.8)
SetBlipAsShortRange(v.blip2, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(nameblip2)
EndTextCommandSetBlipName(v.blip2)
SetBlipRoute(v.blip2, true)
SetBlipRouteColour(v.blip2,29)
end
end
function setblip3(blip3, nameblip3)
for i, v in ipairs(blip3) do
v.blip3 = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite(v.blip3, 545)
SetBlipColour(v.blip3, 50)
SetBlipScale(v.blip3, 0.6)
SetBlipAsShortRange(v.blip3, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(nameblip3)
EndTextCommandSetBlipName(v.blip3)
SetBlipRoute(v.blip3, true)
SetBlipRouteColour(v.blip3,29)
end
end
function setblip4(blip4, nameblip4)
for i, v in ipairs(blip4) do
v.blip4 = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite(v.blip4, 500)
SetBlipColour(v.blip4, 50)
SetBlipScale(v.blip4, 0.6)
SetBlipAsShortRange(v.blip4, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(nameblip4)
EndTextCommandSetBlipName(v.blip4)
SetBlipRoute(v.blip4, true)
SetBlipRouteColour(v.blip4,29)
end
end
function hintToDisplay(text,coords)
local dist = Vdist(coords.x,coords.y,coords.z,GetEntityCoords(PlayerPedId(-1)))
if dist < 1.5 then
DrawText3Ds(coords.x,coords.y,coords.z + 1.05,text, 0, 0.1, 0.1,255)
else
DrawText3Ds(coords.x,coords.y,coords.z + 1.05,text, 0, 0.1, 0.1,100)
end
end
function DrawText3Ds(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x,y,z, 0)
DrawText(0.0, 0.0)
ClearDrawOrigin()
end
-- Client notifications
function SendClientNotification(type, text, time)
-- time = 10000
-- if type == 'success' then
-- exports["Venice-Notification"]:Notify(text, time, "check", options)
-- elseif type == 'error' then
-- exports["Venice-Notification"]:Notify(text, time, "error", options)
-- elseif type == 'info' then
-- exports["Venice-Notification"]:Notify(text, time, "info", options)
-- end
if Configuration.framework == 'esx' then
ESX.ShowNotification(text)
elseif Configuration.framework == 'qbcore' then
QBCore.Functions.Notify(text)
end
end
-- Server side notifications
function SendServerNotification(source, type, text, time)
-- time = 10000
-- if type == 'success' then
-- TriggerClientEvent('codem-notification', source, text, time, 'check', options)
-- elseif type == 'error' then
-- TriggerClientEvent('codem-notification', source, text, time, 'error', options)
-- elseif type == 'info' then
-- TriggerClientEvent('codem-notification', source, text, time, 'info', options)
-- end
if Configuration.framework == 'esx' then
TriggerClientEvent('esx:showNotification', source, text)
elseif Configuration.framework == 'qbcore' then
TriggerClientEvent('QBCore:Notify', source, text)
end
end
The script is easily translatable. Here you can translate it.
Translations = {
['language'] = "EN", --You can choose which language the notifications will be in. (EN, ES, FR)
['EN'] = {
[1] = "~w~PRESS ~ub~[E]~wu~ ~w~TO LOOK FOR A JOB",
[2] = "~w~PRESS ~ub~[E]~wu~ ~w~TO CHANGE INTO WORK CLOTHES",
[3] = "~w~PRESS ~ub~[E]~wu~ ~w~TO REMOVE WORK CLOTHES",
[4] = "Go pick up the vehicle.",
[5] = "Go to the job marked on the gps.",
[6] = "The work was finalized",
[7] = "There is already a vehicle, remove it so that you can take out another one.",
[8] = "Go to the work zone marked on the gps.",
[9] = "The vehicle was stored.",
[10] = "Go to the marked location to finish the job and save the bus",
[11] = "Press [~b~E~w~] - To stop and wait for passengers.",
[12] = "You need to have a bus driver's job for this.",
[13] = "Press [~b~E~w~] - To finish the job.",
[14] = "Go to the Work Zone, with the points marked on the map.",
[15] = "Go and collect the money.",
[16] = "Press [E]",
[17] = "Press [E] to delete",
[18] = "~g~[E]~s~ - Take",
[19] = "~g~[E]~s~ - Drop",
[20] = "You do not have the necessary tool",
[21] = "You must first leave the tool in the vehicle.",
[22] = "finish the job before",
[23] = "You carry: ",
},
['ES'] = {
[1] = "~w~PRESIΓN ~ub~[E]~wu~ ~w~ PARA BUSCAR TRABAJO",
[2] = "~w~PRESIONE ~ub~[E]~wu~ ~w~PARA CAMBIARSE DE ROPA DE TRABAJO",
[3] = "~w~PRESIONAR ~ub~[E]~wu~ ~w~ PARA QUITAR LA ROPA DE TRABAJO",
[4] = "Ve a recoger el vehΓculo",
[5] = "Ve al trabajo marcado en el gps",
[6] = "El trabajo fue finalizado",
[7] = "Ya hay un vehΓculo, retΓralo para poder sacar otro",
[8] = "Vaya a la zona de trabajo marcada en el gps",
[9] = "El vehΓculo fue almacenado",
[10] = "Ve a la zona marcada para terminar el trabajo y guardar el autobΓΊs",
[11] = "Pulse [~b~E~w~] - Para parar y esperar a los pasajeros",
[12] = "Necesitas tener un trabajo de conductor de autobΓΊs para esto",
[13] = "Pulse [~b~E~w~] - Para terminar el trabajo.",
[14] = "Ve a la Zona de Trabajo, con los puntos marcados en el mapa",
[15] = "Ve a recoger el dinero",
[16] = "Pulsa [E]",
[17] = "Pulsa [E] para eliminar",
[18] = "~g~[E]~s~ - Toma",
[19] = "~g~[E]~s~ - Soltar",
[20] = "No tienes la herramienta necesaria",
[21] = "Primero debe dejar la herramienta en el vehΓculo",
[22] = "Termina el trabajo antes",
[23] = "Usted lleva: ",
},
['FR'] = {
[1] = "~w~PRESSURE ~ub~[E]~wu~ ~w~ TO LOOK FOR WORK",
[2] = "~w~PRESSE ~ub~[E]~wu~ ~w~ POUR CHANGER DE VΓTEMENT DE TRAVAIL",
[3] = "~w~PRESS ~ub~[E]~wu~ ~w~ TO REMOVE WORK CLOTHING",
[4] = "Allez chercher le vΓ©hicule",
[5] = "Allez au travail marquΓ© sur le GPS",
[6] = "Le travail est terminΓ©",
[7] = "Il y a dΓ©jΓ un vΓ©hicule, enlevez-le pour que nous puissions en sortir un autre",
[8] = "Allez Γ la zone de travail indiquΓ©e sur le GPS",
[9] = "Le vΓ©hicule a Γ©tΓ© stockΓ©",
[10] = "Allez Γ la zone marquΓ©e pour terminer le travail et stocker le bus",
[11] = "Appuyez sur [~b~E~w~] - Pour vous arrΓͺter et attendre les passagers",
[12] = "Vous devez avoir un emploi de chauffeur de bus pour cela",
[13] = "Appuyez sur [~b~E~w~] - pour terminer le travail.",
[14] = "Allez dans la zone de travail, avec les points marquΓ©s sur la carte",
[15] = "Aller chercher l'argent",
[16] = "Appuyez sur [E]",
[17] = "Appuyez sur [E] pour supprimer",
[18] = "~g~[E]~s~ - Take",
[19] = "~g~[E]~s~ - Release",
[20] = "Vous n'avez pas l'outil nΓ©cessaire",
[21] = "Vous devez d'abord laisser l'outil dans le vΓ©hicule",
[22] = "Finir le travail en premier",
[23] = "Vous portez : ",
},
}
4. CHANGING THE AESTHETICS
As already explained, the colour of the Interface is changed from the CONFIG.lua
But you can also change the BACKGROUND IMAGE, either by putting one of your choice or by changing the colour from one of the backgrounds we have added in the BACKGROUND folder inside the HTML folder.
For that you will have to go to line 17 of the INDEX.HTML and change the name of the image:
<img class="background-img" src="./background/" alt="">
These are the colours in which the BACKGROUND is available. You can always add more.
Last updated