C_CSWeaponBaseGun
This type represents a CCSWeaponBaseGun class.
This type inherits C_BaseEntity type. All of its base methods and fields are also available in this type.
GetAbsOrigin
Method
Returns the absolute origin (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Origin.
Example
local org = wep:GetAbsOrigin();GetMaxSpeed
Method
Returns the maximal player speed when holding this weapon.
Arguments
None.
Returns
Type
Description
float
Max speed, in UPS.
Example
GetInaccuracy
Method
Returns the current inaccuracy value.
Arguments
Name
Type
Description
Returns
Type
Description
float
Inaccuracy value.
Example
GetSpread
Method
Returns the current spread value.
Arguments
Name
Type
Description
Returns
Type
Description
float
Inaccuracy value.
Example
GetDefIndex
Method
Returns the weapon definition index.
Arguments
None.
Returns
Type
Description
Weapon ID.
Example
GetType
Method
Returns the weapon type.
Arguments
None.
Returns
Type
Description
Weapon type.
Example
GetData
Method
Returns the weapon static data.
Arguments
None.
Returns
Type
Description
Weapon data.
Example
IsGun
Method
Returns true if this weapon is a firearm.
Arguments
None.
Returns
Type
Description
bool
true if a firearm.
Example
IsAttackable
Method
Returns true if you can attack with this weapon.
Arguments
None.
Returns
Type
Description
bool
true if can attack.
Example
HasSecondaryAttack
Method
Returns true if this weapon has a secondary attack mode.
Arguments
None.
Returns
Type
Description
bool
true if has the secondary attack mode.
Example
HasSpread
Method
Returns true if this weapon has spread (e.g. knives do not have any spread).
Arguments
None.
Returns
Type
Description
bool
true if has spread.
Example
Last updated