[CS:GO]Create weapons with CreateEntityByName that are not deagles
For quite some time I know about some plugins having an issue where some weapons given by them sound and hit like a deagle, with no recoil.
I've been trying to fix one of my plugins from CS:S to CS:GO and encountered the issue myself, where any weapon created with CreateEntityByName will be a deagle "skinned" as the desired weapon. I was looking around but had no luck in finding a fix (and yes, using CreateEntityByName is necessary for my code). Does anyone know how to fix the issue? |
Re: [CS:GO]Create weapons with CreateEntityByName that are not deagles
This is due to the net send property for the item definition index being set to 1 which is the deagle.
I believe setting m_iItemDefinition to the correct index before dispatching spawn should resolve your issue. I haven't gone down the path of fixing this before as I use GivePlayerItem to spawn weapon entities. |
Re: [CS:GO]Create weapons with CreateEntityByName that are not deagles
Quote:
|
Re: [CS:GO]Create weapons with CreateEntityByName that are not deagles
For my knowledge can u advise if setting the item definition fixed this or did u use give player item?
|
Re: [CS:GO]Create weapons with CreateEntityByName that are not deagles
Quote:
it should fix the issue, how ever im curious about the ammo of the weapon. (mainly the clip) also what about the other netprops weapons use that the client gives the weapon. |
Re: [CS:GO]Create weapons with CreateEntityByName that are not deagles
Quote:
Code:
SetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex", 1); |
Re: [CS:GO]Create weapons with CreateEntityByName that are not deagles
Thanks :)
Btw u can find the index values in csgo/scripts/items/items_game.txt Search for the classname |
All times are GMT -4. The time now is 15:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.