addons.json
The addons.json file (located in resources\vMenu\config\) is used to add addon vehicles / peds / weapons in to vMenu’s addon submenus.
Removing sections
Section titled “Removing sections”In this file you can list all your addon models. If you want to remove all addon models from one of the categories below, simply set that category to []. For example, to remove all models, set each category to the following:
{ "vehicles": [], "peds": [], "weapons": []}Adding models
Section titled “Adding models”If you want to add new models, simply add a comma after the last row in a specific category, add a new line below, and just copy the format from the line above, replacing the name with your new name. For example, here I’ve added 4 extra cars, 1 extra ped and 5 extra weapons:
{ "vehicles": [ "addonvehiclename1", "addonvehiclename2", "addonvehiclenameextra1", "addonvehiclenameextra2", "addonvehiclenameextra3", "addonvehiclenameextra4" ], "peds": [ "addonpedname1", "addonpedname2", "addonpednameextra1" ], "weapons": [ "addonweaponname1", "addonweaponname2", "addonweaponnameextra1", "addonweaponnameextra2", "addonweaponnameextra3", "addonweaponnameextra4", "addonweaponnameextra5" ], "weapon_components": [ "weapon_component_name_1", "weapon_component_name_2" ]}Note: weapon_components are untested and un-documented for now
Renaming vehicles
Section titled “Renaming vehicles”Vehicles cannot be renamed through vMenu. While this would be fairly easy to add, it is not the recommended way to name vehicles, so vMenu intentionally does not include an option for it. The recommended approach is to add vehicle names properly. To properly set a vehicle’s name, follow the easy steps below:
-
Go to the
vehicles.metafile for your vehicle, set the<gameName>MODELNAME</gameName>entry to the vehicle model name. Do NOT enter a custom name in there. For example, if my addonvehicle is calledmgtin-game (shows up asmgtin the addons vehicle spawner/you spawn it by typingmgtin the spawn by name function) then set thegameNametomgtin thevehicles.metafile. -
Go to the
fxmanifest.lua(previously__resource.lua) of your vehicle resource, and add a newclient_script, you can name it whatever you want. For now I’ll useveh_names.lua, so it should look like this:client_script 'veh_names.lua'. -
Create the file you just listed in the
fxmanifest.lua(previously__resource.lua) in your vehicle resource folder:veh_names.lua. -
In that lua file, paste the following:
Citizen.CreateThread(function()AddTextEntry("MODELNAME", "The Display Name You Want Your Vehicle To Appear As, Enter That Name Here")end) -
Now change the
"MODELNAME"to your vehicle’s spawn name (the same name that you set as thegameNamein the vehicles.meta file.) In this case:"mgt". -
Now change the display name. Enter it in the second parameter of the
AddTextEntrycall, in place of the placeholder text. -
The final result should be something like this:
Citizen.CreateThread(function()AddTextEntry("mgt", "Mustang GT")end) -
Do this for every vehicle you have/want to set a custom name for, for example, if I wanted to also do
focusrsandbmwm5. I’d do it like this:Citizen.CreateThread(function()AddTextEntry("mgt", "Mustang GT")AddTextEntry("focusrs", "Focus RS")AddTextEntry("bmwm5", "BMW M5")end)
Default addons.json
Section titled “Default addons.json”{ "vehicles": [ "addonvehiclename1", "addonvehiclename2" ], "peds": [ "addonpedname1", "addonpedname2" ], "weapons": [ "addonweaponname1", "addonweaponname2" ]}Appreciate my work?
Section titled “Appreciate my work?”Consider supporting me on Patreon!
