AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [TF2] Attrib 186 (https://forums.alliedmods.net/showthread.php?t=263423)

Benoist3012 05-25-2015 05:04

[TF2] Attrib 186
 
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

11530 05-25-2015 08:47

Re: [TF2] Attrib 186
 
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.

asherkin 05-25-2015 09:05

Re: [TF2] Attrib 186
 
Quote:

Originally Posted by 11530 (Post 2300793)
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.

11530 05-25-2015 19:15

Re: [TF2] Attrib 186
 
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!

asherkin 05-25-2015 19:22

Re: [TF2] Attrib 186
 
The likely problem here is that it is being set as float rather than an int. (TF2Items only supports float attributes.)

Potato Uno 05-25-2015 21:48

Re: [TF2] Attrib 186
 
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.

Benoist3012 05-26-2015 07:05

Re: [TF2] Attrib 186
 
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.

Chdata 05-26-2015 09:49

Re: [TF2] Attrib 186
 
maybe do like

Float:123456

WildCard65 05-26-2015 10:51

Re: [TF2] Attrib 186
 
Quote:

Originally Posted by Chdata (Post 2301212)
maybe do like

Float:123456

you mean float(123456) right?

asherkin 05-26-2015 11:04

Re: [TF2] Attrib 186
 
Quote:

Originally Posted by WildCard65 (Post 2301232)
you mean float(123456) right?

No, that would convert (giving you 123456.0) rather than cast the bits.


All times are GMT -4. The time now is 13:53.

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