Raised This Month: $ Target: $400
 0% 

Paint detection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KaidemonLP
Member
Join Date: Jul 2016
Old 04-07-2018 , 11:56   Paint detection
Reply With Quote #1

Is there a way to detect the paint of a hat/cosmetic?
Preferably searching by index.

Also make a model use that paint.

Example (Dead of night) :
Code:
if 30309==Australium{
        paint model.mdl
}
KaidemonLP is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 04-07-2018 , 22:39   Re: Paint detection
Reply With Quote #2

TF2 still, I assume.

You can use TF2Attributes and check for the following attributes:
  • set item tint RGB and set item tint RGB 2 (attribute IDs 142 and 261) for normal cosmetic paints. Those return RGB hex values.
  • paintkit_proto_def_index (834) for war paints and decorated weapons. Items in the 15000 - 16999 range are the older campaign reward items; you'll need to check the static attributes for those as well (or just do a check against that range).
  • is australium item (2027) for Australium items.

I don't think you can apply Australium effects on cosmetics and paints on weapons, but I haven't tried it myself.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-07-2018 , 22:42   Re: Paint detection
Reply With Quote #3

I tried before its a hidden attribute which the server cant see
Mitchell 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 13:00.


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