SWEP
Description
Information about Scripted Weapons (SWEPs), used by SANDBOX:PlayerGiveSWEP and in SWEP creation.
For list of callbacks, see WEAPON Hooks
While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values.
Parameters
Default: "Other"
Default: false
Default: false
Default: "Scripted Weapon"
lua/weapons
.Default: "weapon_base"
Default: 1
SWEP
instead. However, if called in a method; use self
instead.Default: "models/weapons/v_pistol.mdl"
Default: false
ViewModelFlip
, but for the second view model.Default: false
ViewModelFlip
, but for the third view model.Default: false
SWEP
.Default: 62
Default: "models/weapons/w_357.mdl"
Default: true
Default: true
Default: 5
Default: 1
Default: 1
Default: true
Default: true
Default: true
Default: true
Default: RENDERGROUP_OPAQUE
0
Default: 0
0-128
Default: 10
Default: surface.GetTextureID( 'gui/speech_lid' )
Default: surface.GetTextureID( 'weapons/swep' )
Default: false
Default: false
* string Ammo - Ammo type ("Pistol", "SMG1" etc)
* number ClipSize - The maximum amount of bullets one clip can hold. Setting it to -1
means
weapon uses no clips, like a grenade or a rocket launch.
* number DefaultClip - Default ammo in the clip, making it higher than ClipSize will give
player additional ammo on spawn
* boolean Automatic - If true makes the weapon shoot automatically as long as the player has
primary attack button held down
Default: false
Default: false
Default: false
Default: "weapon"
Default: true
Default: "materials/entities/<ClassName>.png"