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

[TF2-ANY] Problem with setting property


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 12-02-2017 , 14:18   [TF2-ANY] Problem with setting property
Reply With Quote #1

Hey guys, i've got a problems when i wanna set property to a weapon:
Code:
int weapon = CreateEntityByName("tf_weapon_rocketlauncher_airstrike");
	SetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex", 1104;
	SetEntProp(weapon, Prop_Send, "m_bInitialized", 1);
	SetEntProp(weapon, Prop_Send, "m_iClip1", 999);
	DispatchSpawn(weapon);
	EquipPlayerWeapon(client, weapon);
The weapon(airstrike) spawns and works well, but it doesnt get the 999 ammos which I wanted, can you help me?
Facksy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-03-2017 , 19:02   Re: [TF2-ANY] Problem with setting property
Reply With Quote #2

You might want to use the TF2Items extension instead and add the clip size bonus attribute to it (attribute 4)
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 12-04-2017 , 12:08   Re: [TF2-ANY] Problem with setting property
Reply With Quote #3

Well, is there any way to do it without tf2items? cause the server im playing on isnt running this extension
Facksy 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 10:03.


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