#Adding jobs to shared jobs
1 messages · Page 1 of 1 (latest)
Do what "it" don't help us help you. Adding to jobs.lua shouldn't freeze server just throw error
Hi Viking.
Could you explain what are you trying to achieve?
If you duplicate the police job in shared/jobs.lua and renaming it to "sheriff" or "highwayPatrol" and etc. this won't work by itself.
Functions across qbcore scripts are "hardcoded" to "police" job., so your server is freezing because multicharacter couldn't resolve the new job.
What you can do is:
Either add a grade label in your exsisting police job instance in jobs.lua
Or
Seperate job, which is quite tricky but not impossible.
You need to define it properly as it is in shared/jobs.lua
You would need to update qb-policejob and any dependent scripts like dispatch, garages, armory, duty and so on to also recognize "sheriff" or "highwayPatrol".
You would need to duplicate and adjust exports and conditions everywhere that currently checks only for "police"
I'd go for the first method since it's much easier and the other one is bit more advanced ( if you know what you're doing ).
Thank you! I am using a new police job and not qb-policejob that allowed me to add different departments into it so I'll be utilizing that option instead of editing the jobs.lua to add the separate police departments. I'm still newer to coding so I dont want to make a large mistake with it.