Skip to content

Fixed an issue with certain weapons restrictions not working properly.#431

Merged
jordanbriere merged 1 commit into
Source-Python-Dev-Team:masterfrom
CookStar:fix_weapons_restrictions
Nov 13, 2021
Merged

Fixed an issue with certain weapons restrictions not working properly.#431
jordanbriere merged 1 commit into
Source-Python-Dev-Team:masterfrom
CookStar:fix_weapons_restrictions

Conversation

@CookStar

@CookStar CookStar commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

Classname of a certain weapons cannot be obtained by normal way.

https://developer.valvesoftware.com/wiki/Weapon_cz75a

weapon_cz75a is a point entity available in Counter-Strike: Global Offensive .
Warning: In the I/O system and in VScript, this entity is targeted with the classname weapon_p250 instead!

Code:

#   Weapons
from weapons.entity import Weapon

weapon_entity = Weapon.create("weapon_cz75a")

print("Weapon ClassName: ", weapon_entity.weapon_name)
print("Edict ClassName: ", weapon_entity.edict.classname)

Output:

Weapon ClassName:  weapon_cz75a
Edict ClassName:  weapon_p250

@jordanbriere
jordanbriere merged commit d5da6e6 into Source-Python-Dev-Team:master Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants