NUI JOBS FOR ESX
very nice! thanks for shared!!
i will use it in my server
Very cool script thanks for upload it
Good Job
Very nice script bro, can you just tell me how can i add more jobs to it? Like i already got one more job in the menu but when i click for the interview nothing happens, really apologize if you can help me
looks good dude keep up the good work
Looks good, figuring out how to add more jobs,
#BUG
- I added it without any changes it isnt working at all you cant do an interview
- If you are in that screen and you want to exit by pressing esc you cant move becuase it doesnt close completly
so you can’t get it to work?
1: make sure you name it esx_jk_jobs and place it in your esx folder or else it wont work correctly.
2: to add more jobs if you need i can explain it simple enough to do
Fully working
p.s for everyone want to close the dialog after selecting add this to
index.js
$(".container-fluid").fadeOut();
$.post('http://esx_jk_jobs/fechar', JSON.stringify({}));
Example:
$("#1").click(function() {
$.post('http://esx_jk_jobs/1', JSON.stringify({}));
2
$(".container-fluid").fadeOut();
$.post('http://esx_jk_jobs/fechar', JSON.stringify({}));
});
$("#4").click(function() {
$.post(‘http://esx_jk_jobs/4’, JSON.stringify({}));
2
so how i can add one more job i need to do something there right?
of course we must but how
I added more jobs but I cant get the right jobs after mining. It just goes to back to mining after mining if you know what I mean. Any Idea how to fix it?
How you add more jobs , when i try to add my menu doest show up
Same problem
nvm i fixed it have to look trough all codes
You have to add it on multiple places,
- Config
- Server
- Client (The ID)
- Index.js
You mind tell me what you did?
for me looks like this in index $("#8").click(function() {
$.post(‘http://esx_jk_jobs/7’, JSON.stringify({}));
2
In cliean add the number of the jobs and setJob"ta" because a refer to a new job
RegisterNUICallback(‘6’, function(data, cb)
TriggerServerEvent(‘esx_empregos:setJobta’)
cb(‘ok’)
end)
In the server.lua you added something like this but setjob"ta" must recall to the client. I am not good at explaining because Im just a newbie hope it will help you.
RegisterServerEvent(‘esx_empregos:setJobta’)
AddEventHandler(‘esx_empregos:setJobta’, function(job)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.setJob(Config.job.Tailor, 0)
TriggerClientEvent(‘esx:showNotification’, source, ‘You were hired ~g~’ … xPlayer.getName())
end)
In another files just add number like the example given
So i must to change “Jobta” to something other when i be adding other job right?
Thanks for that bro anyway i will try it !