Two ways to give a weapon + something about CS:GO weapons

Post Python examples to help other users.
battleweaver
Member
Posts: 43
Joined: Mon Oct 02, 2017 7:57 am
Location: Moscow
Contact:

Re: Two ways to give a weapon + something about CS:GO weapons

Postby battleweaver » Thu Nov 02, 2017 9:05 am

Tested new build. Works correctly.
Thank you!

And i would like to continue the discussion about item IDs.
There is parameter m_AttributeManager.m_Item.m_iItemDefinitionIndex, which stores economy ID of an item. In comparison with traditional weapon ID, economy ID is always unique. The issue I encountered with this approach: golden knife does not have economy ID.
User avatar
L'In20Cible
Project Leader
Posts: 1054
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: Two ways to give a weapon + something about CS:GO weapons

Postby L'In20Cible » Thu Nov 02, 2017 1:18 pm

I don't know about the IDs, but just thought I would mention that you can directly use Weapon.item_definition_index. Also, I just noticed that you was printing __dict__. However, if you want to print the dynamic attributes of the entity you must use dir(weapon).

Return to “Code examples / Cookbook”

Who is online

Users browsing this forum: No registered users and 1 guest