All pastes #816828 Raw Edit

Unnamed

public lua v1 · immutable
·published 2007-12-15 00:24 UTC
rendered paste body
if SERVER then	AddCSLuaFile("shared.lua")	SWEP.Weight				= 5	SWEP.AutoSwitchTo		= false	SWEP.AutoSwitchFrom		= falseendif CLIENT then	SWEP.DrawAmmo			= true	SWEP.DrawCrosshair		= true	SWEP.ViewModelFOV		= 65	SWEP.ViewModelFlip		= true	SWEP.CSMuzzleFlashes	= true	SWEP.PrintName = "USPMP 10"	SWEP.Slot = 0	SWEP.Slotpos = 0	SWEP.IconLetter = "a"	SWEP.IconFont = "CSSelectIcons"	surface.CreateFont("csd", ScreenScale(30), 500, true, true, "CSKillIcons")	surface.CreateFont("csd", ScreenScale(60), 500, true, true, "CSSelectIcons")		function SWEP:DrawWeaponSelection( x, y, wide, tall, alpha )		draw.SimpleText( self.IconLetter, self.IconFont, x + wide/2, y + tall*0.2, Color( 15, 20, 200, 255 ), TEXT_ALIGN_CENTER )	end	endSWEP.Author			= "Rambo_6"SWEP.Contact		= ""SWEP.Purpose		= ""SWEP.Instructions	= ""SWEP.Spawnable			= falseSWEP.AdminSpawnable		= falseSWEP.Primary.Sound			= Sound("Weapon_AK47.Single")SWEP.Primary.Recoil			= 1.5SWEP.Primary.Damage			= 40SWEP.Primary.NumShots		= 1SWEP.Primary.Cone			= 0.02SWEP.Primary.Delay			= 0.15SWEP.Primary.ClipSize		= 1SWEP.Primary.DefaultClip	= 1SWEP.Primary.Automatic		= falseSWEP.Primary.Ammo			= "none"SWEP.Secondary.ClipSize		= -1SWEP.Secondary.DefaultClip	= -1SWEP.Secondary.Automatic	= falseSWEP.Secondary.Ammo			= "none"function SWEP:GetMaxAmmo()	return self.Primary.ClipSizeendfunction SWEP:Initialize()	if SERVER then		self:SetWeaponHoldType(self.HoldType)	endendfunction SWEP:Reload()	self.Weapon:DefaultReload(ACT_VM_RELOAD)endfunction SWEP:Deploy()	self.Weapon:SendWeaponAnim(ACT_VM_DRAW)	return trueend function SWEP:Think()	endfunction SWEP:PrimaryAttack()	self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)	if not self:CanPrimaryAttack() then return end	self.Weapon:EmitSound(self.Primary.Sound,100,math.random(98,102))	self:ShootBullets(self.Primary.Damage, self.Primary.NumShots, self.Primary.Cone)	self:TakePrimaryAmmo(1)	self.Owner:ViewPunch(Angle(math.Rand(-0.2,-0.1) * self.Primary.Recoil, math.Rand(-0.1,0.1) *self.Primary.Recoil, 0))	//if CLIENT then		//self.Weapon:SetNetworkedFloat("LastShootTime", CurTime())	//endendfunction SWEP:ShootBullets( damage, numbullets, aimcone)		local bullet = {}	bullet.Num 		= numbullets	bullet.Src 		= self.Owner:GetShootPos()				bullet.Dir 		= self.Owner:GetAimVector()				bullet.Spread 	= Vector( aimcone, aimcone, 0 )			bullet.Tracer	= 5						bullet.Force	= 11									bullet.Damage	= damage	bullet.AmmoType = "Pistol"	bullet.TracerName 	= "Tracer"	bullet.Callback = function ( attacker, tr, dmginfo ) 		if tr.Entity:IsValid() then			if string.find(tr.Entity:GetClass(), "vehicle_") or string.find(tr.Entity:GetClass(), "beacon") then				dmginfo:ScaleDamage(self.Primary.VehDamageScale)			end		end	end		self.Owner:FireBullets( bullet )		self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) 		// View model animation	self.Owner:MuzzleFlash()							// Crappy muzzle light	self.Owner:SetAnimation( PLAYER_ATTACK1 )			// 3rd Person Animation	endfunction SWEP:GetViewModelPosition(pos, ang)	return pos, angendfunction SWEP:SecondaryAttack()	end