Skip to content

Supplemental Permissions

Supplemental permissions are a separate permission system that lets you control who can spawn or use specific whitelisted models. This works for vehicles, peds, and weapons, and it includes addon models as well as base game models.

The idea is simple. You list the model spawn names that you want to protect, vMenu generates a permission for each one, and you then decide which groups are allowed to use them inside your permissions.cfg. Until you grant a whitelisted model to a group, it stays restricted.

This is handled by a separate config file and a generated template file, so it does not interfere with the rest of your permissions.cfg.

Whitelisted models are listed in the config/model-whitelists.json file inside the vMenu resource folder. It has three lists, one for each type of model:

{
"whitelistedvehicle": [
"whitelistedvehiclename1",
"whitelistedvehiclename2"
],
"whitelistedpeds": [
"whitelistedpedname1",
"whitelistedpedname2"
],
"whitelistedweapons": [
"whitelistedweaponname1",
"whitelistedweaponname2"
]
}

To whitelist a model, add its spawn name to the correct list. You can whitelist base game models and addon models in exactly the same way, just use the model’s spawn name.

  • Add vehicle spawn names to whitelistedvehicle.
  • Add ped spawn names to whitelistedpeds.
  • Add weapon names to whitelistedweapons.

A few things to keep in mind:

  • Model names are treated in lowercase, so the generated permission will always be lowercase regardless of how you type it here.
  • For weapons, the weapon_ prefix is removed from the generated permission. For example, weapon_pistol becomes the permission ending in pistol.

Here is an example with real values:

{
"whitelistedvehicle": [
"adder",
"zentorno"
],
"whitelistedpeds": [
"a_m_y_business_01"
],
"whitelistedweapons": [
"weapon_pistol"
]
}

You do not write the permissions yourself. After you list your models and start the server, vMenu generates a template file for you at:

config/templates/SupplementaryPermissionTemplate.cfg

This file is regenerated every time the vMenu resource starts, and it always overwrites the previous version. It contains a header and one ready to use permission line for each whitelisted model, along with the two catch all permissions. Using the example above, the generated file looks like this:

Terminal window
#################################################################
# THIS IS A TEMPLATE FILE. #
# DO NOT EDIT, MAKE A COPY AND EDIT THE COPY. #
#################################################################
add_ace builtin.everyone "vMenu.VehicleSpawner.WhitelistedModels.All" allow
add_ace builtin.everyone "vMenu.PlayerAppearance.WhitelistedModels.All" allow
add_ace builtin.everyone "vMenu.WeaponOptions.WhitelistedModels.All" allow
add_ace builtin.everyone "vMenu.WeaponOptions.WhitelistedModels.pistol" allow
add_ace builtin.everyone "vMenu.VehicleSpawner.WhitelistedModels.adder" allow
add_ace builtin.everyone "vMenu.VehicleSpawner.WhitelistedModels.zentorno" allow
add_ace builtin.everyone "vMenu.PlayerAppearance.WhitelistedModels.a_m_y_business_01" allow

The generated permissions follow these patterns:

Model type Permission node
Vehicle vMenu.VehicleSpawner.WhitelistedModels.<model>
Ped vMenu.PlayerAppearance.WhitelistedModels.<model>
Weapon vMenu.WeaponOptions.WhitelistedModels.<name without weapon_ prefix>

There is also a catch all permission for each type. Granting one of these allows every whitelisted model of that type at once:

  • vMenu.VehicleSpawner.WhitelistedModels.All
  • vMenu.PlayerAppearance.WhitelistedModels.All
  • vMenu.WeaponOptions.WhitelistedModels.All

Once the template file has been generated, the workflow is:

  1. Add your model spawn names to config/model-whitelists.json.
  2. Start the server, and make sure the vMenu resource has run at least once. This is what generates the template file.
  3. Open config/templates/SupplementaryPermissionTemplate.cfg and copy the lines you want into your permissions.cfg.
  4. In permissions.cfg, change builtin.everyone to the group or ace that you want to give access to, and use allow or deny as needed. For example, to allow only your VIP group to spawn the Adder:
Terminal window
add_ace group.vip "vMenu.VehicleSpawner.WhitelistedModels.adder" allow
  1. Restart the server so the updated permissions.cfg is executed.

vMenu writes the template file directly to the config/templates/ folder when the resource starts. If the account running the server cannot write to that folder, vMenu will fail to create or update the file, and the resource will error out while starting.

Consider supporting me on Patreon!