Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Configuration Guide

James edited this page Apr 30, 2019 · 4 revisions

Configuration File

This resource comes with a basic default configuration that is suited to the default ped models. Drawables often vary between different peds and the script has no way of telling which drawables contain the holster. If you are using custom ped models, it is likely that you will need to configure it.

This configuration file relies on the use of Lua tables.

Adding a holster

  1. You need to find out the "component ID", this is the category of the drawable, such as Shirt/Jacket.

    If you are using a trainer of some sort, you can use this table to translate the various categories.

    Component ID Lambda Menu Simple Trainer
    0 Head/Face Head
    1 Beard/Mask Beard
    2 Hair/Hat Hair
    3 Top Upper
    4 Legs Lower
    5 Accessory/Gloves Hands
    6 Accessory/Shoes Shoes
    7 Neck Teeth
    8 Shirt Accessory
    9 Accessory Accessory 2
    10 Badges Badges
    11 Shirt/Jacket Shirt Overlay

    Most of the holsters will either be in the Neck (7) or Accessory (9) categories.

  2. The "drawable ID" indicates which drawable (specific holster) to use. You will need to know the ID of both the filled and empty holster. You can find this number in the trainer or interface.

    Note: In GTA native terms, drawable IDs start at 0. Some trainers such as Simple Trainer adjust the displayed ID by adding 1. It is easiest to use the Lambda menu for this as it displays the real ID.

  3. If you are adding to an existing ped in the config, skip this step. If not, you need to register the ped in the "peds" section of the config like this.

    ["full_ped_name"] = {
      ["components"] = {
        ...
      }
    }
  4. Add the drawables to the ped. The configuration follows a common format:

    ["ped name"] = {
      ["enabled"] = true -- This is an optional field
      ["components"] = {
        [component ID] = {
          [holster with handgun] = empty holster,
        }
      }
    },

    Here is an example for some of the EUP holsters in the male ped, where multiple different holsters are specified:

    ["mp_m_freemode_01"] = { -- Make sure to use the full ped name
      ["components"] = {
        [7] = { -- This is the 'Neck' category
          [1] = 3, -- Drawable '3' is the empty version of drawable '1'
          [6] = 5,
          [8] = 2,
          [42] = 43,
          [110] = 111,
          [119] = 120
        }
      }
    },

The resource comes with a fully working config file that is ready for you to edit. Take a look at it here to see more examples of how the configuration works.