Raised This Month: $51 Target: $400
 12% 

[TF2] Attrib 186


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 05-25-2015 , 05:04   [TF2] Attrib 186
Reply With Quote #1

Hello everyone, I want to set on a item gift from nameofplayer, but I don't know wich number I need to write, I already tried the number in userdata, the steam id.

So I have a idea it's to get the value on a item gifted(a true item in the backpack), but I don't know how get the value
__________________
Benoist3012 is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 05-25-2015 , 08:47   Re: [TF2] Attrib 186
Reply With Quote #2

They say account_id so I'd try the SteamID64 version, e.g. 76561197960287930.
You can get this with GetClientAuthId(client, AuthId_SteamID64, yourstring, sizeof(yourstring)). The number you already tried in userdata is part of your Steam3 ID, which is different.
__________________
11530 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-25-2015 , 09:05   Re: [TF2] Attrib 186
Reply With Quote #3

Quote:
Originally Posted by 11530 View Post
They say account_id so I'd try the SteamID64 version, e.g. 76561197960287930.
You can get this with GetClientAuthId(client, AuthId_SteamID64, yourstring, sizeof(yourstring)). The number you already tried in userdata is part of your Steam3 ID, which is different.
No, that part of the Steam3 ID is the account ID, and is the correct number.
__________________
asherkin is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 05-25-2015 , 19:15   Re: [TF2] Attrib 186
Reply With Quote #4

I had assumed this his failed attempt to use "the number in userdata" (Steam3) would mean it was something other than Steam3. That's why I suggested something else.. But looks like OP was wrong in the first place. I keep saying assumptions make mistakes, yet I fall into this trap when the OP gives wrong info. Of course, I'm now making the assumption that you're correct, Asher. Well, keep trying, Benoist!
__________________
11530 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-25-2015 , 19:22   Re: [TF2] Attrib 186
Reply With Quote #5

The likely problem here is that it is being set as float rather than an int. (TF2Items only supports float attributes.)
__________________
asherkin is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 05-25-2015 , 21:48   Re: [TF2] Attrib 186
Reply With Quote #6

It is indeed an integer:

PHP Code:
<attribute>
<
name>gifter account id</name>
<
defindex>186</defindex>
<
attribute_class>gifter_account_id</attribute_class>
<
description_string>#Attrib_GifterAccountID</description_string>
<description_format>value_is_account_id</description_format>
<
effect_type>positive</effect_type>
<
hidden>true</hidden>
<
stored_as_integer>true</stored_as_integer>
</
attribute
That being said, can't TF2Attributes be somehow used to set integer attributes? I remember reading about it but I don't know how it can be done.

Last edited by Potato Uno; 05-25-2015 at 21:49.
Potato Uno is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 05-26-2015 , 07:05   Re: [TF2] Attrib 186
Reply With Quote #7

Yes it's possible to set a integrer with tf2attributes. So the right number is the steamid64 or the number on userdata?

Edit: Ok I looked old post so it's the userdata number.
__________________

Last edited by Benoist3012; 05-26-2015 at 07:06.
Benoist3012 is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-26-2015 , 09:49   Re: [TF2] Attrib 186
Reply With Quote #8

maybe do like

Float:123456
__________________
Chdata is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-26-2015 , 10:51   Re: [TF2] Attrib 186
Reply With Quote #9

Quote:
Originally Posted by Chdata View Post
maybe do like

Float:123456
you mean float(123456) right?
__________________
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-26-2015 , 11:04   Re: [TF2] Attrib 186
Reply With Quote #10

Quote:
Originally Posted by WildCard65 View Post
you mean float(123456) right?
No, that would convert (giving you 123456.0) rather than cast the bits.
__________________
asherkin 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 21:56.


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