How do I attach a DarkRP Job to a character?

Creating a character is extremely easy and modular, thanks to our typical formatting. There are numerous examples available in the darkrp_mounter.lua file in the directory specified. If you are looking to create custom characters, please see the relevant knowledgebase article. Certain parameters are not used when creating characters that tie to DarkRP jobs, so it is important to consult both for what suits your needs.

The main difference between custom characters and DarkRP-tied characters is the presence of the DarkRPTeam parameter in the character creation, but the method is essentially the same.

1) Navigate to the following directory: lua/wos/charsys/characters/

2) Use one of the existing files, or create your own .lua file in that folder.

3) Characters are created with the following format. You can insert as many as you want in one file, just as if you were making DarkRP jobs:

wOS.CharSys:RegisterCharacter({

Name = "Hobo", --The name of the character, as it will appear in the character menu

DarkRPTeam = "TEAM_HOBO", --The TEAM enumeration of the DarkRP job, as a STRING. VERY IMPORTANT IT IS A STRING

Description = "Lord of the BOX", --The description for the character, as it will appear in the character menu

TextColor = Color( 210, 105, 30), --The color of the name and description in the character mrenu

Sequence = "judge_customize", --The sequence animation for the model to use when displayed in the character menu

UserGroups = false, --Restrictions, if any, for what user group can use this character

-- The costumes and outfits for each model this character can select from

Costumes = {

[ "models/player/corpse1.mdl" ] = {

[ "The King of Hobos" ] = false,

[ "New Aged Pimple" ] = {

UserGroups = false,

Skin = 3,

Bodygroup = {},

}

},

},

-- The function to apply whenever the player spawns as this character

OnSpawn = function( ply )

ply:EmitSound( "npc/zombie/zombie_alert" .. math.random( 1, 3 ) .. ".wav" )

end,

})

 

More information about special parameters such as Loadout, UserGroups, OnSpawn, Costumes, and Model are available in other articles on the knowledgebase.

  • 1 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

How do I use the Cinematic Camera Tool?

To use the Cinematic Camera Tool to place and edit camera locations or create scenes, there are...

What are the console commands?

There is currently only one console command: wos_charsys_toggleconfig It allows you to use the...

How do I use MySQL saving?

Using MySQL saving is fairly simple, but you will need a module before hand. 1) If your host...

Couldn't include file 'includes/modules/mysqloo.lua'

If you are using MySQL data saving and seeing this error, it means your server is missing...

How do I create a custom character?

Creating a character is extremely easy and modular, thanks to our typical formatting. There are...