# Peds

The **illenium-appearance** resource allows you to blacklist specific ped models based on various criteria. This feature helps restrict access to certain peds depending on the player's role. The supported criteria for blacklisting peds include:

- **Jobs**
- **Gangs**
- **ACEs (Access Control Entries)**

### How It Works [#how-it-works]

To blacklist specific ped models, you need to modify the configuration in the `shared/peds.lua` file. The default file contains a list of all ped models without any restrictions applied.

### Example Use Case [#example-use-case]

Let's say you want to limit access to the following ped models based on specific conditions:

- **Peds Available to "police" job**:  
  `a_f_m_beach_01`, `a_f_m_bevhills_01`, `a_f_m_bevhills_02`
- **Peds Available to "vagos" gang**:  
  `a_f_m_bodybuild_01`
- **Peds Available to players with the "admin" ACE**:  
  `a_f_m_downtown_01`
- **Peds Available to both "police" job and "ballas" gang**:  
  `a_f_m_skidrow_01`

To apply these restrictions, you need to remove any existing peds from the default list that do not have specific filters or limits defined.

### Configuration Example [#configuration-example]
```lua title="peds.lua"
Config.Peds = {
    pedConfig = {
        -- Default peds list, no restrictions
        {
            peds = {...} -- List of peds that are accessible to everyone
        },
        -- Police Job restriction
        {
            peds = {"a_f_m_beach_01", "a_f_m_bevhills_01", "a_f_m_bevhills_02"},
            jobs = {"police"} -- Accessible only to players with the "police" job
        },
        -- Vagos Gang restriction
        {
            peds = {"a_f_m_bodybuild_01"},
            gangs = {"vagos"} -- Accessible only to players in the "vagos" gang
        },
        -- Admin ACE restriction
        {
            peds = {"a_f_m_downtown_01"},
            aces = {"admin"} -- Accessible only to players with the "admin" ACE
        },
        -- Police Job and Ballas Gang restriction
        {
            peds = {"a_f_m_skidrow_01"},
            jobs = {"police"},  -- Accessible only to players with the "police" job
            gangs = {"ballas"} -- Accessible only to players in the "ballas" gang
        }
    }
}
```

### Config Breakdown [#config-breakdown]
- **pedConfig**  
  This section contains a list of configurations for various peds. Each configuration can specify one or more conditions based on jobs, gangs, and ACEs.
- **peds**  
  The list of ped models that you want to apply restrictions to. You can specify multiple peds in an array.
- **jobs**  
  Restricts a ped to players with a specific job. For example, if a ped is only available to players with the "police" job, add:
  ```lua
  jobs = { "police" }
  ```
- **gangs**  
  Restricts a ped to players in a specific gang. For example:
  ```lua
  gangs = { "vagos" }
  ```
  limits the ped to players in the "vagos" gang.
- **aces**  
  Restricts a ped to players with a specific ACE (Access Control Entry). For example:
  ```lua
  aces = { "admin" }
  ```
  makes the ped available only to players with the "admin" ACE.

### Customizing the Ped Blacklist [#customizing-the-ped-blacklist]
You can modify the blacklist to fit your server's needs:
1. **Adding more peds**: Simply add the name of the ped(s) you want to restrict in the `peds` list.  
2. **Assigning roles**: Use the `jobs`, `gangs`, or `aces` fields to specify which roles should have access to the ped. You can combine these fields to apply multiple restrictions simultaneously.  
3. **Ensure accurate ped names**: Double-check that the ped names you use are correct and match the available models.

<Callout type="info">
### Notes [#notes]
- Make sure that the ped names are accurate and correspond to the correct ped models in your resource.  
- Ensure the roles (jobs, gangs, ACEs) are correctly set up in your server's configuration to avoid conflicts or unwanted access.
</Callout>
