Raised This Month: $32 Target: $400
 8% 

[Team Fortress 2]How to get real weapon?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Master Cake
Junior Member
Join Date: May 2020
Location: Planet Earth
Old 06-09-2020 , 23:37   [Team Fortress 2]How to get real weapon?
Reply With Quote #1

Hello everyone! I have a problem with getting weapon in primary slot.

Here is code:
Code:
int weaponIndex = GetPlayerWeaponSlot(myClient, 0); //Save ENTITY index
Item[myClient] = GetEntProp(weaponIndex, Prop_Send,  "m_iItemDefinitionIndex"); //Save WEAPON index to the array for users. (need that to store initial weapon for each client)

SetEntProp(weaponIndex, Prop_Send,  "m_iItemDefinitionIndex", 513); //513 - weapon index Original Rocket Launcher (indexes)
When I execute it gives me <"Original">. Rockets, weapon model and sounds are like a Stock RL but model position and rotation angles are like an Original RL. And after regeneration my HP or ammo I get Stock again.

What am I doing wrong?

Last edited by Master Cake; 06-09-2020 at 23:38.
Master Cake is offline
 



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 16:53.


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