Raised This Month: $32 Target: $400
 8% 

[FIXED] Use TF2Items_SetAttribute


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 11-29-2013 , 12:38   [FIXED] Use TF2Items_SetAttribute
Reply With Quote #1

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.
__________________
Want to check my plugins ?

Last edited by Arkarr; 11-30-2013 at 11:30.
Arkarr is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:30.


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