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

Setting something with a string attribute?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 12-24-2014 , 04:43   Setting something with a string attribute?
Reply With Quote #1

As used by both the Quickiebomb Launcher and Iron Bomber.

Code:
"675"
{
	"name" "custom projectile model"
	"attribute_class" "custom_projectile_model"
	"attribute_type" "string"
	"description_format" "value_is_additive"
	"hidden" "1"
	"effect_type" "positive"
}

"custom projectile model"
{
	"attribute_class" "custom_projectile_model"
	"value" "models/workshop/weapons/c_models/c_kingmaker_sticky/w_kingmaker_stickybomb.mdl"
}

"custom projectile model"
{
	"attribute_class" "custom_projectile_model"
	"value" "models/workshop/weapons/c_models/c_quadball/w_quadball_grenade.mdl"
}
From what I understand, TF2Items can't set these types of attributes?

PHP Code:
native TF2Items_SetAttribute(Handle:hItemiSlotIndexiAttribDefIndexFloat:flValue); 
Because the value set is always a float.

I tried and made a weapon so powerful it crashes the server, of course.
__________________

Last edited by Chdata; 12-27-2014 at 19:17.
Chdata is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-24-2014 , 08:50   Re: Setting something with a string attribute?
Reply With Quote #2

Maybe if SourcePawn gets generic types, it may be possible. IDK.
__________________
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-24-2014 , 19:00   Re: Setting something with a string attribute?
Reply With Quote #3

There is no way to network custom strings to the client from the game server, they have to come from the GC, so it's not possible with a server plugin.
__________________

Last edited by asherkin; 12-24-2014 at 19:00.
asherkin is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-29-2014 , 20:14   Re: Setting something with a string attribute?
Reply With Quote #4

You can set it manually, by hooking spawnpost and calling setentitymodel.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-01-2015 , 02:24   Re: Setting something with a string attribute?
Reply With Quote #5

Hmm... that works for nades?

Why does VSH attachprojectilemodel ;v
__________________
Chdata 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 14:08.


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