Added a new step in the description, look for it
So Iâm having a problem with the 2 Jobs system. I have edited all the files as described and every time it loads my character and everybody else into an NPC. It gave me 0 erros in console. I have double checked all the process and cant figurer it out
[RESOLVED] [MISS ONE STEP]
Beautifull !! Now itâs work perfectly with esx_society and bossmenu for setjob and promote/hire/fire The job 1 and job2 ! Just amazing ! Thank you very much !
Just 1 problem. i cant see the money for job 1 AND job 2. but itâs refresh when we put some money ( or buy or withdraw)
i will try the peycheck system now. Thank you !
good evening after a few days to redo the double job on my serve it finally works but I have one thing to ask you is that there are of you who has concerns with the paycheck I receive nothing of all if you can help me thank you all is still thank you the double job tomtom
Error running call reference function for resource es_extended: citizen:/scripting/lua/scheduler.lua:351: server/main.lua:222: attempt to index a nil value (field â?â)
stack traceback:
server/main.lua:222: in upvalue ârefâ
citizen:/scripting/lua/scheduler.lua:337: in function citizen:/scripting/lua/scheduler.lua:336
[C]: in function âxpcallâ
citizen:/scripting/lua/scheduler.lua:336: in function citizen:/scripting/lua/scheduler.lua:335
stack traceback:
[C]: in function âerrorâ
citizen:/scripting/lua/scheduler.lua:351: in function citizen:/scripting/lua/scheduler.lua:322
[ERROR] [MySQL] Check the error above, an error happens when executing the callback from the query : âSELECT * FROMjob_grades
WHEREjob_name
= @job_name ANDgrade
= @grade {@job_name=unemployed2}â
Get that error, work without DBG_Lesterjobs work with esx_policejob
Its possible that you insert your files in pastebin / hastebin and give us the links, please?
Myabe because DBG_Lesterjobs sets the job 1 and you are trying to attribute the unemployed2 to the job 1
So you may edit DBG_Lesterjobs to make it pointing the job 2 .
(unemployed2 is when you have no job as JOB 2 )
good evening someone has already had trouble i do not get the salary is when i put back normal i get the job pay but if i but the function pay with job is job2 i have nothing is i have no information if anyone one had the same problem is if he can explain to me how to solve thank you to all
Hi Guys.
I have a problem on my server, with the ESX drugs system. AFter i installed all the step for 2 jobs, i got everything to work perfectly, But the police can now pick up drugs, even though they couldnât do it before i did this 2 jobs.
Anyone have an idea how to fix that?
PS. Sorry about bad grammar, hope you get my question
- If you want that the job 2 is taking into account in scoreboards (to count policemen) you will have to edit the code etcâŚ
If you read the description you may see that each script that verify
if PlayerData.job~=nil ... then .......
have to be modified. BR
Hello, Ive changed all my scripts to as it is above, yet the second job insnt coming up when in game. I only have the one job? Ive done eveything that was said, I have no errors when I boot the game up, and while in game I have no errors?
Anyone else had this issue, I know it could be anything but if you have an idea id appreshiate a response.
Thank
its not running, to mutch to read, maybe the owner of this topic can please update it?
Maybe because you missed something, too much to ready for someone not interested in learning how things are done but looking for a drag and drop ressource that this post isnât, nope only update it if I forgot something or did a mistake.
PS: The double job is a modification of the ESX framework, its not an independent ressource.
You saddly have to know a minimum of things. And I think that minimum is really appropriate according to the description Iâve done.
PS 2: The only one thing that is missing is the way to attribute the second job to a player without the /setjob2 command.
Iâve shared a way to do it, use DBG_LesterJobs and modify it (Iâm not allowed to release a modification of his script) (Never asked for it) :
DBG_LesterJobs (the second job office from Santagain, for which Iâve never asked permission for editing and releasing modifications)
BR
I think so long to be there, that when it is published, that you do not have to work through 200 postings to get to a result. However thank you for this unqualified answer. Of course, I have already worked with the rescoure
Not a bad script at all! 100% will use!
? Still donât understand the meaning of your unqualified remark. Maybe your remark was usefull for the topic or for helping someone but I missed that.
BR
So I done every stepâŚwe did it in twos and threes with six experienced eyesâŚitâs still not working. I donât know what we did wrong. I uploaded my steps in Guthub, maybe one can look over it and see an error, fork and correct it, please.
Error:
- I spawn as Tony Hawk
- The Job, Mony, Bank and Job two I donât see
- /setjob 1 police 3 > Player not online.
- /setjob2 testjob 0 > not working
Github:
All scripts have been downloaded and edited. I have only the edited files in the folders. I did not create the scripts and they do not belong to me, but to the creator!
To check file between fix and original I use Beyond Compare 4.
GreetZ
NebelRebell
So I done every step
nope sry
-You spawn in Tony Hawk I think because you have a jobs2 and jobs_grade2 tables. You just have to insert into the jobs table the unemployed2 and not create 2 new tables.
Step 1 and 2:
1) Create a new job
Database -> jobs table -> add a new job in the jobs table (unemployed is for the job 1, unemployed2 will be used for the job 2)
2) Create a new job grade
Database -> job_grades table -> add a new grade
When you set the job 2 it will pick the job and the grade from the jobs table not from a jobs2 table
I forwarded few commits on your files but as you said âwith six experienced eyesâ you should see others mistakes like forgetting to modify
if PlayerData.job ~=nil and PlayerData.job.name==âpoliceâ then
With
if (PlayerData.job ~=nil and PlayerData.job.name==âpoliceâ) or (PlayerData.job2 ~=nil and PlayerData.job2.name==âpoliceâ) then
BR hope it will help
i will check, thx for helping, now Iâm in the garden write later - sometimes you do not see the forest because there are too many trees in the wayâŚ
Step 1 and 2:
âŚwhere is the board in front of your head?!
Step 3 alos doneâŚ
âŚwhere ist here, please, my mistake?
Thx for HELPINGâŚ
Why create table jobs2 ?
Why create table job_grades2 ?
You have already a jobs and jobs_grade table.
You have to insert into the
- table JOBS : unemployed2
- table JOBS_GRADES : unemployed2 0 0 {} {}
Look near the end of police job client.lua
ALTER TABLE `users`
ADD COLUMN `job2` varchar(255) NULL DEFAULT 'unemployed2' AFTER `job_grade`,
ADD COLUMN `job_grade2` INT NULL DEFAULT 0 AFTER `job2`
;
INSERT INTO `jobs` VALUES ('unemployed2','Arbeitslos');
INSERT INTO `job_grades` VALUES ('unemployed2','Arbeitslos','Arbeitslos',0,{},{});
no more things needed in the sql
Oh manâŚhope that was my wooden board in front of my eyesâŚwill test and wrote back