#Qbcore jobs with boss menus

1 messages · Page 1 of 1 (latest)

fallow flax
#

I need help setting it up. I tried many times and it just breaks every other script

unborn pollen
#

What have you tried?

You’ll have to put more effort into the thread if you want someone to actually be able to help

fallow flax
#

I tried adding a sheriff boss menu location (in qb-management) and job (in jobs.lua)

#

I can edit the police boss menu location and it works but I can't seem to add a different one without it breaking

unborn pollen
#

Can you send the config file and the jobs.lua?

fallow flax
#

Would you be able to talk in support vc?

#

All I did for the other job was copy that one and paste it either underneath or at the bottom

#

And I only changed police to sheriff and Chief to Sheriff

#

I also had it lined up right

#

Did pretty much the same for this

unborn pollen
#

Send the files how you have it

Are there any errors on the consoles?

fallow flax
#

ensure qb-core

^1SCRIPT ERROR: Execution of function reference in script host failed: ^7
^3> fn^7 (^5@qb-interior/client/main.lua^7:26)
^1SCRIPT ERROR: Execution of function reference in script host failed: ^7
^3> fn^7 (^5@qb-hud/client.lua^7:1106)
Stopping resource qb-apartments
Stopping resource qb-houses
Stopping resource qb-multicharacter
Stopping resource qb-core
Creating script environments for qb-core
Started resource qb-core

^1SCRIPT ERROR: Execution of function reference in script host failed: ^7
^3> handler^7 (^5@qb-taxijob/client/main.lua^7:42)
^1SCRIPT ERROR: @qb-core/client/loops.lua:15: attempt to index a nil value (field 'metadata')^7
^3> fn^7 (^5@qb-core/client/loops.lua^7:15)
^1SCRIPT ERROR: Execution of function reference in script host failed: ^7
^3> fn^7 (^5@qb-taxijob/client/main.lua^7:622)

ensure qb-management

Stopping resource qb-management
Creating script environments for qb-management
Started resource qb-management

^1SCRIPT ERROR: Execution of function reference in script host failed: ^7
^3> handler^7 (^5@qb-taxijob/client/main.lua^7:42)
^1SCRIPT ERROR: Execution of function reference in script host failed: ^7
^3> ref^7 (^5@qb-inventory/server/commands.lua^7:117)

#

All the errors^^^^

timber orbit
#

?

fallow flax
#

I've done it a few times with a few edits

timber orbit
#

Yea

fallow flax
#

And it still does it

timber orbit
#

You cant restart qb-core like wny script

#

Because it will stop other resources

timber orbit
#

If u need to apply ur edit in qbcore you need to restart the whole server

timber orbit
fallow flax
#

Thanks for telling me that

#

I would have never figured it out

#

Imma try it rq

#

Yeah it worked🤣

#

After all that

#

How would I go about editing the menu open options and third eyeing it with ox_target or qb for now

#

I think this is it

fallow flax
#

Cool

timber orbit
#

But for ox target usage

#

You need to replace qb target usage with ox target

fallow flax
#

Is it difficult?

timber orbit
#

You just need to see the usage of ox target

#

And replace the export name

#

Search in ox_target docs for addSphereZone

fallow flax
#

Ok

#

Got it

timber orbit
#

Ok,

This is an example of qb target usage


exports['qb-target']:AddCircleZone("exampleZone", vector3(100.0, -200.0, 30.0), 1.5, {
    name = "exampleZone",
    debugPoly = false,
    useZ = true
}, {
    options = {
        {
            type = "client",
            event = "example:event",
            icon = "fas fa-box",
            label = "Open Menu",
            job = "police"
        }
    },
    distance = 2.0
})

And this is the same for ox_target


exports.ox_target:addSphereZone({
    coords = vector3(100.0, -200.0, 30.0),
    radius = 1.5,
    debug = false,
    options = {
        {
            name = "exampleZone",
            event = "example:event",
            icon = "fas fa-box",
            label = "Open Menu",
            groups = "police",
            distance = 2.0
        }
    }
})

#

Try to figure out how to replace it

#

And if you have any problems or questions just send here

fallow flax
#

Also for the vectors I used

fallow flax
timber orbit
#

And on qb management its inside config.lua

fallow flax
#

Ok

#

Would it go into that file?

#

Its cl_boss.lua

timber orbit
#

And cl_gang also

fallow flax
#

So i'm just replacing that whole code in both?

#

My bad

#

221 to 236