Stream add-on weapons and custom loadouts
Custom weapons are second only to custom vehicles in popularity. The process is similar to vehicles but uses different metadata files. This lesson covers the full pipeline and the common mistakes that leave weapons invisible or unshootable.
Build it
Prepare the resource
resources/my_weapon/
fxmanifest.lua
data/
weapons.meta
stream/
w_ar_myrifle.yft
w_ar_myrifle.ytd
An add-on weapon needs at minimum: the model (.yft), the textures (.ytd), and the metadata (.meta). Some downloads include sounds (.awc/.dat) - include those if present.
Check weapons.meta
<Weapon type="WEAPON_MYRIFLE">
<modelName>w_ar_myrifle</modelName>
<animGroup>rifle</animGroup>
<ClipSize>30</ClipSize>
<Damage>35.000000</Damage>
<Recoil>0.350000</Recoil>
...
</Weapon>
The <modelName> is your spawn name. The <Weapon type> is a GTA weapon slot - adding to WEAPON_ASSAULTRIFLE means it shares ammo and animations with the assault rifle class.