I'm a bit confused here. I'm trying to add a particle effect (134 ; X), but every method I do just replaces all of the attributes of the weapon instead of keeping them and adding one more.
Code:
stock GiveNewWeapon(client, itemIndex, attribute, String:classname[], slot)
{
new Handle:newItem = TF2Items_CreateItem(OVERRIDE_ITEM_LEVEL | OVERRIDE_ITEM_QUALITY | OVERRIDE_ATTRIBUTES | PRESERVE_ATTRIBUTES);
TF2Items_SetItemIndex(newItem, itemIndex);
TF2Items_SetLevel(newItem, 100);
TF2Items_SetQuality(newItem, 6);
TF2Items_SetAttribute(newItem, 0, 134, float(attribute));
TF2Items_SetNumAttributes(newItem, 1);
TF2Items_SetClassname(newItem, classname);
TF2_RemoveWeaponSlot(client, slot);
new entity = TF2Items_GiveNamedItem(client, newItem);
EquipPlayerWeapon(client, entity);
}
What do I modify to keep the weapon's attributes (like FaN keeping FaN attributes) and add on the particle effect? I've tried with and without OVERRIDE_ATTRIBUTES and nothing works.