Weapon clip how to
Posted: Thu Jul 16, 2015 5:16 pm
by arawra
How would I get the current amount of ammo in a weapon's clip?
Posted: Thu Jul 16, 2015 5:56 pm
by satoon101
PlayerEntity inherits not only from Entity, but also _PlayerWeapons. Here is the section of that class that involves getting weapon clips:
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/players/weapons/__init__.py#L72You can also use the following to print out all attributes (written in and dynamically added) for PlayerEntity:
Syntax: Select all
for x in dir(PlayerEntity(index)):
print(x)