3.0.0.1-alpha

This is a detailed changelog for the specified release above.

◾ Maximize Interface

Players can now make jobs, entities, etc. go full screen and hide the left-side navigation bar. The state of the left-side bar will be saved for the entire session. If the player hides the left bar and then closes the menu; once they re-open it, the bar will continue to stay hidden.

◾ 'NeedToChangeFrom' Parameter

When setting up DarkRP jobs; you have the ability to use NeedToChangeFrom as a parameter in your job itself. This parameter allows you to specify if a player must be a certain job in order to change into the new job as a "prerequisite".

TEAM_CHIEF = DarkRP.createJob( 'Civil Protection Chief',
{
    color               = Color( 20, 20, 255, 255 ),
    model               = 'models/player/combine_soldier_prisonguard.mdl',
    description         = [[The Chief is the leader of the Civil Protection]],
    weapons             = { 'arrest_stick', 'unarrest_stick', 'weapon_deagle2', 'stunstick', 'door_ram', 'weaponchecker' },
    command             = 'chief',
    max                 = 1,
    salary              = GAMEMODE.Config.normalsalary * 1.67,
    admin               = 0,
    vote                = false,
    hasLicense          = true,
    chief               = true,
    ammo =
    {
        [ 'pistol' ]    = 60,
    },
    NeedToChangeFrom    = TEAM_POLICE,
    category = 'Civil Protection',
})

In the example code above, we specify that in order to become a Civil Protection Chief; the player must first be in TEAM_POLICE.

If the player attempts to view the Civil Protection Chief job in the F4 menu, without being in the TEAM_POLICE job, they will see the following in the list:

It will also display an error message to the far right of the interface underneath the information for the selected job.

You can specify more than one required job by using the code:

    NeedToChangeFrom    = { TEAM_POLICE, TEAM_CAPTAIN },

This will allow a user to be either one of two jobs and become the job. They must either be in TEAM_POLICE OR TEAM_CAPTAIN.

◾ 'NeedGroup' parameter

Much like the NeedToChangeFrom parameter, NeedGroup allows a server owner to restrict a job to a certain set of user groups.

TEAM_CHIEF = DarkRP.createJob( 'Civil Protection Chief',
{
    color               = Color( 20, 20, 255, 255 ),
    model               = 'models/player/combine_soldier_prisonguard.mdl',
    description         = [[The Chief is the leader of the Civil Protection]],
    weapons             = { 'arrest_stick', 'unarrest_stick', 'weapon_deagle2', 'stunstick', 'door_ram', 'weaponchecker' },
    command             = 'chief',
    max                 = 1,
    salary              = GAMEMODE.Config.normalsalary * 1.67,
    admin               = 0,
    vote                = false,
    hasLicense          = true,
    chief               = true,
    NeedGroup           = { 'vip' },
    ammo =
    {
        [ 'pistol' ]    = 60,
    },
    NeedToChangeFrom    = TEAM_POLICE,
    category            = 'Civil Protection',
})

The example above sets a user group for the job Civil Protection Chef; which can only be joined if the player is part of the user group VIP AND is currently in the TEAM_POLICE job.

If a player is not part of the VIP user-group; they will see the following information on the right side of the F4 interface:

As displayed in the above screenshot; the error message "Need group(s): vip" will appear at the bottom of the selected job. It will also automatically inject another warning within the job description itself as shown above under the job player model.

You can supply multiple user-groups to the list:

NeedGroup           = { 'vip', 'donator', 'admin' },

The "NeedGroup" parameter can also replace the original darkrp parameter "CustomCheck".

The CustomCheck function was a way for server owners to specify a required group for a job, however, the new NeedGroup function provides a lot more information for the job itself.

◾ Customized Accent Coloring

Customized coloring for each item is now possible with an additional parameter being added to the entity, shipment, etc. This is a great way to accent certain items and make them stand out more in the F4.

With the following example code; you can force the Tip Jar entity to display in the F4 with a customized circle color:

DarkRP.createEntity( 'Tip Jar',
{
    ent         = 'darkrp_tip_jar',
    model       = 'models/props_lab/jar01a.mdl',
    price       = 0,
    max         = 2,
    cmd         = 'tipjar',
    allowTools  = true,
    clr         = Color( 183, 27, 116 ),
})

The above code will make the Tip Jar display as:

By default, if a color is not provided, it will make the accent of the circle grey.

Additionally, there are three ways to define the color parameter, all of which give the same result, but are provided in case you forget one method:

clr         = Color( 183, 27, 116 ),
Color       = Color( 183, 27, 116 ),
color       = Color( 183, 27, 116 ),

◾ Revised Tab Settings

This update attempts to make customizing the tabs of the F4 menu more simple by introducing a new config category at the top of lua\modules\arivia\cfg\sh_4_tabs.lua called cfg.tabs.general.

Settings within this config table allow you to alter the overall functionality of ALL tabs instead of having to change the settings for each individual one.

These settings affect the main F4 categories ( jobs, entities, shipments, ammo, weapons, vehicles, and food ).

Last updated