PDA

View Full Version : How can I change item_class?


VintageDoodle
04-05-2014, 07:42
Is it possible to change the "item_class" of a weapon in tf2items.weapons.txt?

KvGetString(hKeyValues, "class", strBuffer, sizeof(strBuffer));
TF2Items_SetClassname(hItem, strBuffer);
iItemFlags |= OVERRIDE_CLASSNAME;

Why does this remove weapons?

I found a related thread https://forums.alliedmods.net/showthread.php?p=2046815 here but I don't understand what powerlord means by keeping track of when the weapon is being replaced.

Mitchell
04-08-2014, 09:51
If i can recall right, you need to force generate the weapon.
Check out how Custom Weapons 2 Beta 2 does it. i dont think i have messed with it at all.