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

[TF2] Determine if a weapon has a Strange Stat Clock attached


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
frankdrebin
Junior Member
Join Date: Feb 2017
Old 03-02-2017 , 22:00   [TF2] Determine if a weapon has a Strange Stat Clock attached
Reply With Quote #1

Hello, I was wondering if anyone could provide code to determine if an attacker's weapon in Team Fortress 2 has a Strange Stat Clock attached to it? I know that GetEntProp(iWeapon, Prop_Send, "m_iEntityQuality") has to equal 6 for Unique (since Stat Clocks can only be applied to unique weapons) but I am not sure how to determine if the Stat Clock is attached or not. Any help would be appreciated. Thank you.
frankdrebin is offline
frankdrebin
Junior Member
Join Date: Feb 2017
Old 03-03-2017 , 20:32   Re: [TF2] Determine if a weapon has a Strange Stat Clock attached
Reply With Quote #2

EDIT: I actually discovered that the stat clocks can only be applied to Civilian Grade weapons which have m_iEntityQuality = 15.
frankdrebin is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-04-2017 , 21:23   Re: [TF2] Determine if a weapon has a Strange Stat Clock attached
Reply With Quote #3

Quote:
Originally Posted by frankdrebin View Post
EDIT: I actually discovered that the stat clocks can only be applied to Civilian Grade weapons which have m_iEntityQuality = 15.
Er... no, that's the only grade weapons that can have stat clocks added to them after they're unboxed.

*Any* decorated weapons can have a stat clock attached to them.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 03-04-2017 at 21:24.
Powerlord is offline
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 01-01-2018 , 11:25   Re: [TF2] Determine if a weapon has a Strange Stat Clock attached
Reply With Quote #4

Resurrecting this thread, since there was no definitive solution found (from what I can tell).

Tried determining using TF2Attributes, but this doesn't work either:
Code:
if(TF2Attrib_GetByName(weapon, "weapon_uses_stattrak_module") != Address_Null)
	{
		return true;
	}
		
	if(TF2Attrib_GetByName(weapon, "weapon_stattrak_module_scale") != Address_Null)
	{
		return true;
	}
	
	if(TF2Attrib_GetByName(weapon, "kill eater") != Address_Null)
	{
		return true;
	}
Did anyone else find a solution?
__________________
Stopped hosting servers as of November 2018, no longer active around here.
pcmaster 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 08:25.


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