How do I create a custom character?

Creating a character is extremely easy and modular, thanks to our typical formatting. There are numerous examples available in the base_mounter.lua file in the directory specified. If you are looking to tie characters to DarkRP jobs, please see the relevant knowledgebase article.

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

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 menu

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

Model = "models/player/corpse1.mdl", --The model or table of models the player can selection from when choosing this character

Loadout = { "weapon_bugbait", "weapon_crowbar", }, --The loadout for the character, to be given on player spawn

-- 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 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

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 attach a DarkRP Job to a character?

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