AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   TF2Items (https://forums.alliedmods.net/forumdisplay.php?f=146)
-   -   [FIXED] Use TF2Items_SetAttribute (https://forums.alliedmods.net/showthread.php?t=230638)

Arkarr 11-29-2013 12:38

[FIXED] Use TF2Items_SetAttribute
 
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(clientString:classname[], iItemDefinitionIndex, &Handle:hItem)
{
    
hItem TF2Items_CreateItem(OVERRIDE_ATTRIBUTES|PRESERVE_ATTRIBUTES);
        
    
TF2Items_SetClassname(hItemclassname);

        
//Doesn't work as excepted
    
TF2Items_SetAttribute(hItem01350.60);
    
TF2Items_SetAttribute(hItem11780.65);

    
TF2Items_SetNumAttributes(hItem2);
                    
    
TF2Items_GiveNamedItem(clienthItem);

    return 
Plugin_Changed;


FIXED: User have min 3 weapons = effect apllyed 3 times.


All times are GMT -4. The time now is 22:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.