Here is an example of code that can be used to create pls_jobsystem (link) directly in the job database.
Valid for ESX only
1) Go to server.lua - Find event pls_jobsystem:server:saveNewJob
Insert the code registerJobInDatabase(jobData) under the SaveJobs() function
ifnotIsJobExist(jobData.job) thentable.insert(Jobs, jobData)lib.notify(src, {title="Hell yeah!",description="A new job has been created!",type="success" })SaveJobs()registerJobInDatabase(jobData)else
Then, at the end of server.lua, insert the new function we will create.
functionregisterJobInDatabase(data)end
What does the data value contain?
Function registerJobInDatabase(data)
Don't forget to add to fxmanifest.lua
IMPORTANT
This code assumes that you are using oxmysql https://github.com/overextended/oxmysql