CWeaponCSBase

From Source Entities
(Redirected from Weapon cs base)
Jump to navigation Jump to search

Code classes:

CWeaponCSBase is the base class for weapons in the Counter-Strike and Left 4 Dead games.

Classnames:

  • weapon_cs_base (Not in FGD) - Useless entity. Causes bugs in Css.png, crashes in L4d.pngL4d2-small.pngCsgo-small.png.

Keyvalues[edit | edit source]

Reserve Ammo (Not in FGD) (ammo) <integer> (only available in Css.png)
How much extra ammo the gun has. The gun will always come with at least one full clip. Does not work on non-gun weapons.
Is this weapon allowed to be picked up? (CanBePickedUp) <boolean> (only available in Csgo-small.png)
Self-explanatory.

Inputs[edit | edit source]

SetReserveAmmoAmount <integer> (only available in Csgo-small.png)
Sets how much reserve ammo the gun has. Cannot be set higher than that weapon's set maximum.
SetAmmoAmount <integer> (only available in Csgo-small.png)
Sets how many rounds are in the gun's clip. Can disobey the gun's clip limit freely, but all extra rounds will be transferred into reserve when the player decides to reload. Player cannot reload if they have no reserve, even when they have more than one magazine's worth of rounds loaded in.
ToggleCanBePickedUp  (only available in Csgo-small.png)
Toggles allowed to be picked up?.