Setup Jobs

How to setup access for multiple jobs?

  • Add new job into your database (jobs & job_grades)

  • Add new society to database addon_account

  • Open config.lua then add to Config.Jobs new job (Remeber about , when adding new job into Config.Jobs)

["mechanic"] = {
        JobName = "mechanic", -- Job Name which you created to database
        MechanicBlip = vec3(1146.6356, -782.2756, 57.5988),
        MechanicBlipType = 446,
        MechanicBlipColor = 57,
        MechanicBlipSize = 0.8,
        MechanicBlipName = "Test Mechanic Job", -- Label of job which will be shown in bossmenu, dispatch and blip
        Duty = {
            Position = vec3(1159.8756, -780.7558, 56.6051), -- Duty on/off marker / ox-target
            Color = {r = 3, g = 215, b = 252}, -- color of marker (Leave it when using ox-target)
            ZoneSize = {x = 0.6, y = 0.6, z = 0.6} -- size of marker / ox-target
        },
        Dispatch = {
            Command = "mirrormechanic", -- if Config.DispatchDefaultCommands is enabled this is dispatch command for players to this job (See How to configurate custom dispatch ex. in your phone: https://docs.otherplanet.dev/scripts/mechanic-job/setup-dispatch)
            CommandDescription = "Send Dispatch from current location to Mirror's Mechanic",
            DispatchTag = "#MRR-"
        },
        Zones = {
            -- Important: Do not change action value!!!
            ['garage'] = {
                Position = vec3(1132.5463, -793.5722, 56.5953), -- Garage marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "garage", -- Do not change it!!
                ZoneSize = {x = 1.0, y = 1.0, z = 1.0}
            },
            ['locker'] = {
                Position = vec3(1132.3767, -779.2751, 56.6056), -- Locker marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "locker", -- Do not change it!!
                ZoneSize = {x = 1.1, y = 1.1, z = 1.1}
            },
            ['bossmenu'] = {
                Position = vec3(1156.5420, -780.1456, 56.6051), -- Bossmenu marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "bossmenu", -- Do not change it!!
                ZoneSize = {x = 0.8, y = 0.8, z = 0.8}
            },
        },
        Vehicles = {
            -- Vehicles which will be available to buy from bossmenu
            {
                VehicleLabel = "Pounder",
                VehicleSpawnName = "pounder2",
                VehiclePrice = 25000,
                VehicleImage = "https://bagieta.me/mechanicjob/pounder2.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/va.png",
                VehicleDesc = "Vehicle for transporting goods"
            },
            {
                VehicleLabel = "Burrito",
                VehicleSpawnName = "burrito3",
                VehiclePrice = 12000,
                VehicleImage = "https://bagieta.me/mechanicjob/burrito3.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/v.png",
                VehicleDesc = "Vehicle for emergency calls"
            },
            {
                VehicleLabel = "FlatBed",
                VehicleSpawnName = "flatbed",
                VehiclePrice = 45000,
                VehicleImage = "https://bagieta.me/mechanicjob/flatbed.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/mtl.png",
                VehicleDesc = "A vehicle adapted to tow cars"
            },
        },
        BossmenuGradeToAccess = 4, -- at what grade user can access bossmenu
        GarageGradeToAccess = 0,-- at what grade user can access garage
        LockerGradeToAccess = 0, -- at what grade user can access locker
    },
  • Config with more than 1 job should look:

Config.Jobs = {
    ["mechanic"] = {
        JobName = "mechanic", -- Job Name which you created to database
        MechanicBlip = vec3(1146.6356, -782.2756, 57.5988),
        MechanicBlipType = 446,
        MechanicBlipColor = 57,
        MechanicBlipSize = 0.8,
        MechanicBlipName = "Test Mechanic Job", -- Label of job which will be shown in bossmenu, dispatch and blip
        Duty = {
            Position = vec3(1159.8756, -780.7558, 56.6051), -- Duty on/off marker / ox-target
            Color = {r = 3, g = 215, b = 252}, -- color of marker (Leave it when using ox-target)
            ZoneSize = {x = 0.6, y = 0.6, z = 0.6} -- size of marker / ox-target
        },
        Dispatch = {
            Command = "mirrormechanic", -- if Config.DispatchDefaultCommands is enabled this is dispatch command for players to this job (See How to configurate custom dispatch ex. in your phone: https://docs.otherplanet.dev/scripts/mechanic-job/setup-dispatch)
            CommandDescription = "Send Dispatch from current location to Mirror's Mechanic",
            DispatchTag = "#MRR-"
        },
        Zones = {
            -- Important: Do not change action value!!!
            ['garage'] = {
                Position = vec3(1132.5463, -793.5722, 56.5953), -- Garage marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "garage", -- Do not change it!!
                ZoneSize = {x = 1.0, y = 1.0, z = 1.0}
            },
            ['locker'] = {
                Position = vec3(1132.3767, -779.2751, 56.6056), -- Locker marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "locker", -- Do not change it!!
                ZoneSize = {x = 1.1, y = 1.1, z = 1.1}
            },
            ['bossmenu'] = {
                Position = vec3(1156.5420, -780.1456, 56.6051), -- Bossmenu marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "bossmenu", -- Do not change it!!
                ZoneSize = {x = 0.8, y = 0.8, z = 0.8}
            },
        },
        Vehicles = {
            -- Vehicles which will be available to buy from bossmenu
            {
                VehicleLabel = "Pounder",
                VehicleSpawnName = "pounder2",
                VehiclePrice = 25000,
                VehicleImage = "https://bagieta.me/mechanicjob/pounder2.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/va.png",
                VehicleDesc = "Vehicle for transporting goods"
            },
            {
                VehicleLabel = "Burrito",
                VehicleSpawnName = "burrito3",
                VehiclePrice = 12000,
                VehicleImage = "https://bagieta.me/mechanicjob/burrito3.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/v.png",
                VehicleDesc = "Vehicle for emergency calls"
            },
            {
                VehicleLabel = "FlatBed",
                VehicleSpawnName = "flatbed",
                VehiclePrice = 45000,
                VehicleImage = "https://bagieta.me/mechanicjob/flatbed.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/mtl.png",
                VehicleDesc = "A vehicle adapted to tow cars"
            },
        },
        BossmenuGradeToAccess = 4, -- at what grade user can access bossmenu
        GarageGradeToAccess = 0,-- at what grade user can access garage
        LockerGradeToAccess = 0, -- at what grade user can access locker
    },
    ["mechanic2"] = {
        JobName = "mechanic2", -- Job Name which you created to database
        MechanicBlip = vec3(1146.6356, -782.2756, 57.5988),
        MechanicBlipType = 446,
        MechanicBlipColor = 57,
        MechanicBlipSize = 0.8,
        MechanicBlipName = "Test Mechanic Job 2", -- Label of job which will be shown in bossmenu, dispatch and blip
        Duty = {
            Position = vec3(1159.8756, -780.7558, 56.6051), -- Duty on/off marker / ox-target
            Color = {r = 3, g = 215, b = 252}, -- color of marker (Leave it when using ox-target)
            ZoneSize = {x = 0.6, y = 0.6, z = 0.6} -- size of marker / ox-target
        },
        Dispatch = {
            Command = "bennymechanic", -- if Config.DispatchDefaultCommands is enabled this is dispatch command for players to this job (See How to configurate custom dispatch ex. in your phone: https://docs.otherplanet.dev/scripts/mechanic-job/setup-dispatch)
            CommandDescription = "Send Dispatch from current location to Benny's Mechanic",
            DispatchTag = "#BBB-"
        },
        Zones = {
            -- Important: Do not change action value!!!
            ['garage'] = {
                Position = vec3(1132.5463, -793.5722, 56.5953), -- Garage marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "garage", -- Do not change it!!
                ZoneSize = {x = 1.0, y = 1.0, z = 1.0}
            },
            ['locker'] = {
                Position = vec3(1132.3767, -779.2751, 56.6056), -- Locker marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "locker", -- Do not change it!!
                ZoneSize = {x = 1.1, y = 1.1, z = 1.1}
            },
            ['bossmenu'] = {
                Position = vec3(1156.5420, -780.1456, 56.6051), -- Bossmenu marker / ox-target
                Color = {r = 3, g = 215, b = 252}, -- (Leave it when using ox-target)
                Action = "bossmenu", -- Do not change it!!
                ZoneSize = {x = 0.8, y = 0.8, z = 0.8}
            },
        },
        Vehicles = {
            -- Vehicles which will be available to buy from bossmenu
            {
                VehicleLabel = "Pounder",
                VehicleSpawnName = "pounder2",
                VehiclePrice = 25000,
                VehicleImage = "https://bagieta.me/mechanicjob/pounder2.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/va.png",
                VehicleDesc = "Vehicle for transporting goods"
            },
            {
                VehicleLabel = "Burrito",
                VehicleSpawnName = "burrito3",
                VehiclePrice = 12000,
                VehicleImage = "https://bagieta.me/mechanicjob/burrito3.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/v.png",
                VehicleDesc = "Vehicle for emergency calls"
            },
            {
                VehicleLabel = "FlatBed",
                VehicleSpawnName = "flatbed",
                VehiclePrice = 45000,
                VehicleImage = "https://bagieta.me/mechanicjob/flatbed.png",
                VehicleLogo = "https://bagieta.me/mechanicjob/mtl.png",
                VehicleDesc = "A vehicle adapted to tow cars"
            },
        },
        BossmenuGradeToAccess = 4, -- at what grade user can access bossmenu
        GarageGradeToAccess = 0,-- at what grade user can access garage
        LockerGradeToAccess = 0, -- at what grade user can access locker
    },
}
  • Thats All! Restart your server and enjoy!

Last updated