All pastes #743910 Raw Edit

Something

public lua v1 · immutable
·published 2007-10-20 22:00 UTC
rendered paste body
// Show debug info?local debug = true//----------------------------------------------//Author Info//----------------------------------------------SWEP.Author             = "--- AUTHOR NAME ---"SWEP.Contact            = "--- CONTACT EMAIL ---"SWEP.Purpose            = "--- PURPOSE ---"SWEP.Instructions       = "--- INSTRUCTIONS ---"//----------------------------------------------SWEP.Spawnable = trueSWEP.Adminspawnable = true// First person ModelSWEP.ViewModel = "models/weapons/v_pistol.mdl"// Third Person ModelSWEP.WorldModel = "models/weapons/w_pistol.mdl"// Weapon DetailsSWEP.Primary.Clipsize = 30SWEP.Primary.DefaultClip = -120SWEP.Primary.Automatic = trueSWEP.Primary.Ammo = "smg1"SWEP.Secondary.Clipsize = -1SWEP.Secondary.DefaultClip = -1SWEP.Secondary.Automatic = falseSWEP.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 hereend//--------------------------------------------// 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