
SWEP.Spawnable = false // Can everybody spawn this SWEP? - If you want only admins to spawn it, keep this false and admin spawnable true. SWEP.AdminSpawnable = true // Is the SWEP spawnable for admins? SWEP.Purpose = "WhatsThePurposeOfThisSwep" // What is the purpose of the SWEP? SWEP.Contact = "YourMailAdress" // How people should contact you if they find bugs, errors, etc SWEP.Instructions = "SwepInstructions" // How do people use your SWEP? SWEP.Author = "yaddablahdah" // Your name SWEP.PrintName = "Killa_Pistol" // The name of your SWEP Should use Counter-Strike muzzle flashes upon firingĪ default pistol, change the variables under SWEP.Primary and SWEP.Secondary This must be the texture ID, see surface.GetTextureID. Override this in your SWEP to set the icon in the weapon selection.

The scale of the viewmodel sway (1.0 should be the default). Should draw the default HL2 ammo counter. The scale of the viewmodel bob (1.0 should be the default). The default amount of ammo to give when you get the weaponĪuto switch from if you pick up a better weapon.ĭecides whether we should switch from/to this. The size of a clip (how much you can shoot before you reload) Should the weapon keep firing if the player's mouse is still down? (pistol, smg, grenade, ar2, etc.)Īmmo type for the primary/secondary fire mode ("Pistol", "SMG" etc) Path to the world model (the weapon viewed on the ground or in hands of NPCs). The Weapon object manipulated by the SWEP. Should the view model be flipped? (left handed weapon). Path to the view model (the weapon viewed from the player's point of view). If false, players can't spawn that weapon (you can set to false for base weapons). The folder in which the SWEP files are located.Ĭontains infos about the secondary attack. The SWEP menu sorts all the weapons of the same category together. If false, admins can't spawn that weapon (you can set to false for base weapons). SWEPs are written in Lua and reside in the lua/weapons directory. Other SWEPs you may have used are the Toolgun and Camera. These weapons vary from melee weapons (such as knives or fists) to long-ranged weapons (such as sniper rifles) to prop/NPC spawners (such as Garry's Manhack Gun).


Find more pages that need work here.Ī SWEP is a Scripted Wea pon, such as the weapons in the Weapons Menu. Improvement can be discussed on the talk page. This page needs to be edited as it contains information that is unclear or incorrect.
