I'm trying to edit attributs on weapon but it doesn't react as excepted.
Attribut 135 should be set to 60% and attribut 178 to 65%. Can anyone help me ?
PHP Code:
public Action:TF2Items_OnGiveNamedItem(client, String:classname[], iItemDefinitionIndex, &Handle:hItem)
{
hItem = TF2Items_CreateItem(OVERRIDE_ATTRIBUTES|PRESERVE_ATTRIBUTES);
TF2Items_SetClassname(hItem, classname);
//Doesn't work as excepted
TF2Items_SetAttribute(hItem, 0, 135, 0.60);
TF2Items_SetAttribute(hItem, 1, 178, 0.65);
TF2Items_SetNumAttributes(hItem, 2);
TF2Items_GiveNamedItem(client, hItem);
return Plugin_Changed;
}
FIXED: User have min 3 weapons = effect apllyed 3 times.
__________________