// Show debug info? local debug = true //---------------------------------------------- //Author Info //---------------------------------------------- SWEP.Author = "--- AUTHOR NAME ---" SWEP.Contact = "--- CONTACT EMAIL ---" SWEP.Purpose = "--- PURPOSE ---" SWEP.Instructions = "--- INSTRUCTIONS ---" //---------------------------------------------- SWEP.Spawnable = true SWEP.Adminspawnable = true // First person Model SWEP.ViewModel = "models/weapons/v_pistol.mdl" // Third Person Model SWEP.WorldModel = "models/weapons/w_pistol.mdl" // Weapon Details SWEP.Primary.Clipsize = 30 SWEP.Primary.DefaultClip = -120 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "smg1" SWEP.Secondary.Clipsize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" // Sound //local ShootSound = Sound ("Metal.SawbladeStick") //-------------------------------------------- // Called when it reloads //-------------------------------------------- function SWEP:Reload() if debug then print("Reload") // Shove your debugging code in here end // All reload code goes in here end //-------------------------------------------- // Called each frame when the Swep is active //-------------------------------------------- function SWEP:Think() end //-------------------------------------------- // Called when the player Shoots //-------------------------------------------- function SWEP:PrimaryAttack() // Play shoot sound self.Weapon:EmitSound("Weapon_AR2.Single") // Shoot 9 bullets, 150 damage, 0.75 aimcone self:ShootBullet( 150, 1, 0.01 ) // Remove 1 bullet from our clip self:TakePrimaryAmmo( 1 ) // Punch the player's view self.Owner:ViewPunch( Angle( -1, 0, 0 ) ) end //-------------------------------------------- // Called when the player Uses secondary attack //-------------------------------------------- function SWEP:SecondaryAttack() if debug then print("Secondary Attack") // Put your debugging code in here end // Any Code you want to my executed when the player uses secondary attack goes in here self.Weapon:EmitSound(ShootSound) end