Arivia
Browse ScriptsDownload RLIB
v3.x
v3.x
  • Introduction
  • Select Version
  • Showcase
  • Changelog
    • ◾3.0.0.6-beta
    • ◾3.0.0.5-beta
    • ◾3.0.0.4-beta
    • ◾3.0.0.3-beta
    • ◾3.0.0.2-beta
    • ◾3.0.0.1-alpha
  • FAQ
    • ◾Add Food Categories
    • ◾Addon Won't Show
    • ◾Incompatible Addons
    • ◾Custom Category Colors
    • ◾Hide Unavailable Jobs
    • ◾Modified Script
    • ◾Refunds
    • ◾Script Errors
    • ◾When Are Updates?
  • ❱ Setup
    • ◾Install
    • ◾Verify
    • ◾Workshop
    • ◾Docs/Web
  • ❱ Configuration
    • ◾Env
    • ◾Fonts
    • ◾Languages
    • ◾Settings
      • sh_4_tabs.lua
        • bUseModelImage
        • styleB
    • ◾Visual Blueprints
  • ❱ First Use
    • ◾Binds
    • ◾Console Commands
      • ▸arivia.listjobs
      • ▸arivia.getjob
      • ▸arivia.setjob
  • ❱ Developers
    • ◾Jobs
      • ▸Parameters
        • tip
        • NeedJob
        • NeedGroup
      • ▸Sorting
    • ◾Entities
      • ▸accent
      • ▸allowed
      • ▸customHideUnavail
      • ▸level
      • ▸prestige
      • ▸price
      • ▸tip
    • ◾Food
      • ▸category
    • ◾Categories
      • ▸tip
  • ❱ Internal
    • ◾Rules
    • ◾Web Demo
  • ❱ DOC REFERENCES
    • ◾Status
Powered by GitBook
On this page
  • ◾ Alphabetical
  • ◾ Jobs file order
  • ◾ Manual Order
  • ◾ Player Choice
  1. ❱ Developers
  2. Jobs

▸Sorting

Below is a list of ways you may sort jobs.

◾ Alphabetical

To sort all jobs alphabetically:

  • Open lua\modules\arivia\cfg\sh_4_tabs.lua

  • Find bRawData within the cfg.tabs.jobs table, set to false

  • Restart server

cfg.tabs.jobs =
{
     bEnabled                    = true,
     bRawData                    = false,



{ code continues below -- do not remove }

◾ Jobs file order

To sort jobs in order based on how they are added in config\jobrelated.lua:

  • Open lua\modules\arivia\cfg\sh_4_tabs.lua

  • Find bRawData within the cfg.tabs.jobs table, set to true

  • Restart server

cfg.tabs.jobs =
{
     bEnabled                    = true,
     bRawData                    = true,



{ code continues below -- do not remove }

◾ Manual Order

To sort based on an unorganized darkrp jobs file which gives you control to define where each job appears even if you don't have the jobs organized in the darkrp file itself.

You will need to utilize the sortOrder parameter which needs to be specified for each job.

  • Open lua\modules\arivia\cfg\sh_4_tabs.lua

  • Find bRawData within the cfg.tabs.jobs table, set to false

  • Open config\jobrelated.lua

  • Add sortOrder to each job individually

  • Restart server

TEAM_CIVILIAN = DarkRP.createJob( 'Civilian',
{
    color           = Color( 255, 255, 255, 255 ),
    model           = { 'models/player/group01/male_01.mdl' },
    description     = [[Citizen]],
    command         = 'civilian',
    max             = 0,
    salary          = 50,
    admin           = 0,
    category        = 'Basic',
    sortOrder       = 1,
} )


TEAM_BUM = DarkRP.createJob( 'Bum',
{
    color           = Color( 255, 255, 255, 255 ),
    model           = { 'models/player/corpse1.mdl' },
    description     = [[Bum]],
    command         = 'bum',
    max             = 0,
    salary          = 50,
    admin           = 0,
    category        = 'Basic',
    sortOrder       = 3,
} )

TEAM_DOCTOR = DarkRP.createJob( 'Doctor',
{
    color           = Color( 255, 255, 255, 255 ),
    model           = { 'models/player/kleiner.mdl' },
    description     = [[Test]],
    command         = 'doctor',
    max             = 2,
    salary          = 100,
    admin           = 0,
    category        = 'Basic',
    sortOrder       = 2,
} )

The above code would add 3 new jobs in the category Basic:

  • Civilian Slot 1

  • Bum Slot 3

  • Doctor Slot 2

◾ Player Choice

In the future, a sorting option will be added which allows the player themself sort the list of jobs by any one of the following:

  • Job Name (A - Z, Z - A)

  • Salary (Least to Greatest, Greatest to Least)

  • Slots (Least to Greatest, Greatest to Least)

  • Default (How they are entered into the jobs file

PreviousNeedGroupNextEntities

Last updated 4 years ago

◾