I'm using TF2Items_CreateItem in my plugin. i removed Eyelander's attributes with OVERRIDE_ALL flag. but sometimes it doesn't change.
Here is my code:
PHP Code:
new Handle:hWeaponSword = INVALID_HANDLE;
...
// Demoman's Eyelander
hWeaponSword = TF2Items_CreateItem(OVERRIDE_ALL);
TF2Items_SetClassname(hWeaponSword, "tf_weapon_sword");
TF2Items_SetItemIndex(hWeaponSword, 132);
TF2Items_SetQuality(hWeaponSword, 6);
TF2Items_SetLevel(hWeaponSword, 0);
TF2Items_SetNumAttributes(hWeaponSword, 0);
...
new iEntity, iIndex;
if (TF2_GetPlayerClass(iClient) == TFClass_DemoMan)
{
iEntity = GetPlayerWeaponSlot(iClient, 2);
if (IsGoodEntity(iEntity))
{
iIndex = GetEntProp(iEntity, Prop_Send, "m_iItemDefinitionIndex");
if (hWeaponSword != INVALID_HANDLE)
{
if (iIndex == 132)
{
TF2_RemoveWeaponSlot(iClient, 2);
iEntity = TF2Items_GiveNamedItem(iClient, hWeaponSword);
EquipPlayerWeapon(iClient, iEntity);
}
}
}
}
in this code, Eyelander's attribute has been removed. but in game, it displays like this:
Quote:
The Eyelander
Level 0 Sword
No random critical hits
-25 max health on wearer
This weapon has a large melee range.
Gives increased speed and health with every head you take.
|
those attributes should be removed. but it doesn't removed.
please help!
sorry for poor english skill
edit) and i'm using tf2items_release-4624dbfba23d for Windows.