LoadoutScript is a resource for FiveM by Albo1125 that allows players to easily equip loadouts read from a json file, rather than having to set a ped model and a bunch of components and prop options manually every time you spawn. It also allows you to specify which weapons are given when equipping a loadout. You can categorize loadouts into divisions, accessible from a NativeUI menu. Screenshots can be found at the bottom.
- Download the latest release.
- Unzip the LoadoutScript folder into your resources folder on your FiveM server.
- Create a loadouts.json file in the LoadoutScript folder (or rename the example if you prefer).
- Add the following to your server.cfg file:
start LoadoutScript
- Type /lo in chat to access the loadouts menu.
Customise your loadouts in the loadouts.json file. You can add as many loadouts as you like. An example loadouts.json file is included. JSON reference is as follows.
Every entry in the root array is a Loadout.
- "Division" string indicating the main category of this loadout.
- "Name" string indicating the (unique?) name of this loadout for that division.
- "TaserOption" true or false depending on whether you want a Taser option checkbox.
- "PedModelName" string representing the model name of the ped.
- "WeaponHashes" array of CitizenFX.Core.WeaponHash enum values (string representation).
- "DefaultCustomisables" array of either PedsComponent or PedsProp objects (see below).
- "LoadoutOptions" array of LoadoutOption objects
- "Name"string indicating the name of this option.
- "NoneOption" true or false, if true adds a None option to the list of selectable values that doesn't change the ped's components/props.
- "OptionNameToCustomisable" Dictionary mapping a name string (descriptive of the component or prop) to either a PedsComponent or PedsProp object (see below).
- "$type":"LoadoutScript.PedCustomisables.PedsComponent, LoadoutScript.net"
- "componentId" one of the following: Head, Beard, Hair, Upper, Lower, Hands, Shoes, Acc1, Acc2, Badges, AuxTorso
- "drawableId" the drawable ID to set this component to. For simple trainer users: first number as listed on the clothes menu, minus 1.
- "textureId" the texture ID to set this component to. For simple trainer users: third number as listed on the clothes menu, minus 1.
- "$type":"LoadoutScript.PedCustomisables.PedsProp, LoadoutScript.net"
- "propId" one of the following: Hats, Glasses, Ears, Watches
- "drawableId" the drawable ID to set this component to. For simple trainer users: first number as listed on the clothes menu, minus 1.
- "textureId" the texture ID to set this component to. For simple trainer users: third number as listed on the clothes menu, minus 1.
Please view LICENSE.md. Improvements and new feature additions are very welcome, please feel free to create a pull request. Proper credit is always required if you release modified versions of my work.