This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

TF2Items - Items with custom attributes.


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-21-2011 , 14:35   Re: TF2Items - Items with custom attributes.
#801

Quote:
Originally Posted by jouva View Post
Wat?
I guess he meant: tf/addons/sourcemod/.hg_archival.txt

but i have no idea what that has to do with anything....
__________________
Velture is offline
jouva
Senior Member
Join Date: Jan 2010
Old 04-21-2011 , 14:41   Re: TF2Items - Items with custom attributes.
#802

And I bet it's probably there but hidden because it's a .file name, so it's hidden by the FTP by default.
jouva is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 04-21-2011 , 18:18   Re: TF2Items - Items with custom attributes.
#803

Quote:
Originally Posted by Velture View Post
i have no idea what that has to do with anything....
It doesn't.
__________________
DarthNinja is offline
jockersoft
Member
Join Date: Aug 2008
Old 04-22-2011 , 06:41   Re: TF2Items - Items with custom attributes.
#804

I'm having some troubles with the sandman: the player seems to equip it correctly (he can swing it and hit other players) but he can't launch the ball by clicking mouse2

PHP Code:
public Action:timer_GiveWeapon(Handle:timerany:client) {
    if(
IsPlayerAlive(client)) {
        
TF2_RemoveAllWeapons(client);
        
giveWeapon(client"tf_weapon_bat_wood"44996);
    }
}

giveWeapon(clientString:classname[], itemindexlevelquality) {
    new 
Handle:hItem TF2Items_CreateItem(OVERRIDE_CLASSNAME OVERRIDE_ITEM_DEF OVERRIDE_ITEM_LEVEL OVERRIDE_ITEM_QUALITY);
    
TF2Items_SetClassname(hItemclassname);
    
TF2Items_SetItemIndex(hItemitemindex);
    
TF2Items_SetLevel(hItemlevel);
    
TF2Items_SetQuality(hItemquality);
    if (
hItem == INVALID_HANDLE)
        return -
1;
    
    new 
entity TF2Items_GiveNamedItem(clienthItem);
    
EquipPlayerWeapon(cliententity);
    
SetEntPropEnt(clientProp_Send"m_hActiveWeapon"entity);
    return 
entity;
}

public 
OnPluginStart() {
    
HookEvent("player_spawn"event_player_spawn);
}

public 
Action:event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast) {
    new 
client GetClientOfUserId(GetEventInt(event"userid"));    
    
CreateTimer(0.1timer_GiveWeaponclientTIMER_FLAG_NO_MAPCHANGE);    
    return 
Plugin_Continue;

jockersoft is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-22-2011 , 07:06   Re: TF2Items - Items with custom attributes.
#805

@jockersoft

Code:
  "38"
  {
   "name" "mod bat launches balls"
   "attribute_class" "set_weapon_mode"
   "attribute_name" "Bat can fire several grenades before melee mode."
   "min_value" "1"
   "max_value" "1"
   "group" "only_on_unique"
   "description_string" "#Attrib_BatLaunchesBalls"
   "description_format" "value_is_additive"
   "hidden" "0"
   "effect_type" "positive"
   "stored_as_integer" "0"
  }
But i don't know is that helpfull for you. That is the attribute for balls launching.
__________________
Velture is offline
jockersoft
Member
Join Date: Aug 2008
Old 04-22-2011 , 07:20   Re: TF2Items - Items with custom attributes.
#806

Quote:
Originally Posted by Velture View Post
@jockersoft

Code:
  "38"
  {
   "name" "mod bat launches balls"
   "attribute_class" "set_weapon_mode"
   "attribute_name" "Bat can fire several grenades before melee mode."
   "min_value" "1"
   "max_value" "1"
   "group" "only_on_unique"
   "description_string" "#Attrib_BatLaunchesBalls"
   "description_format" "value_is_additive"
   "hidden" "0"
   "effect_type" "positive"
   "stored_as_integer" "0"
  }
But i don't know is that helpfull for you. That is the attribute for balls launching.
thanks!
I needed to add the OVERRIDE_ATTRIBUTES flag to TF2Items_CreateItem
and then
TF2Items_SetAttribute(hItem, 0, 38, 1.0);
jockersoft is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-22-2011 , 09:07   Re: TF2Items - Items with custom attributes.
#807

Quote:
Originally Posted by jockersoft View Post
thanks!
I needed to add the OVERRIDE_ATTRIBUTES flag to TF2Items_CreateItem
and then
TF2Items_SetAttribute(hItem, 0, 38, 1.0);
Im glad that i could help.
__________________
Velture is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-23-2011 , 15:31   Re: TF2Items - Items with custom attributes.
#808

ash - have yopu asked valve about painting hats?
Since the april 14 update and linking steam account to server i'm not sure if thats ok to paint hats... I don;t have any profit from it but i dont know if thats ok with valve.

Do you have any idea? Did robin respond to your question?>
__________________
Velture is offline
criunk
Junior Member
Join Date: Apr 2011
Old 04-23-2011 , 18:14   Re: TF2Items - Items with custom attributes.
#809

How can i set flags for premium members that they have 24/7 a golden wrench when they equip standart wrench?
criunk is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-24-2011 , 02:27   Re: TF2Items - Items with custom attributes.
#810

You can't.
You can try changing wrench attributes "turn to gold" but it still will be normal wrench with custom attribute.
MAYBE it would be possible with tf2items giveweapons plugin. MAYBE.
__________________
Velture is offline
Closed Thread



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 14:38.


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