[Release] [ESX] Easy Weapon Accessories (Add and remove attachments)

I’m slowly working on adding a lot of components missing (Extended Clip, Muzzle Break, Compensator, Scopes, etc), as well as MK2 weapons (You need to make sure the MK2 weapons and components are added to es_extended)

I’m not adding it all because I feel like there should be a way to index the components in a table when its just the number at the end that changes, especially skins, since most of them go:

COMPONENT_REVOLVER_MK2_CAMO_02
to
COMPONENT_REVOLVER_MK2_CAMO_07, etc,etc (Usually from 02 to 10)

I’m still learning Code so bear with me while I figure out how to do this kind of stuff.
Because there are many muzzle breaks and shit too…
And barrels…
And tints…

Tints I haven’t touched yet, but I will… again, need a way to easily have a table of tints and only call the number after it, or else you would need to add like 20 lines PER MK2 weapon… seems like a lot of repetitive code…

I will send a pull or merge or whatever once I’m done! Save you guys some work.

For references on tints, I’ve been looking at this: xnWeapons v1.0.1 - A beautiful and intuitive weapon shop resource. **NOT FOR RP SERVERS**

But seems like it wouldn’t be too complicated… check weapon, check tint, get number of tint, apply to weapon.

The tricky part is going to be altering the weapon tables everywhere (property inventories, trunks, trading items) to add components and not fuck up the old data? (Maybe? Still a Trial Dev here LOL…)

3 Likes