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:
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.
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 } }}
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:
jobs = { "police" }
gangs
Restricts a ped to players in a specific gang. For example:
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:
aces = { "admin" }
makes the ped available only to players with the "admin" ACE.
You can modify the blacklist to fit your server's needs:
Adding more peds: Simply add the name of the ped(s) you want to restrict in the peds list.
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.
Ensure accurate ped names: Double-check that the ped names you use are correct and match the available models.