All pastes #429890 Raw Edit

Something

public lua v1 · immutable
·published 2007-04-08 15:33 UTC
rendered paste body
-- ROCK SWEPSWEP.ViewModel = "models/weapons/v_pistol.mdl"SWEP.WorldModel = "models/weapons/w_props_junk/rock001a.mdl"SWEP.Weight = 5SWEP.AutoSwitchTo = falseSWEP.AutoSwitchFrom = falseSWEP.PrintName = "Rock"SWEP.Slot = 1SWEP.SlotPos = 5SWEP.DrawAmmo = falseSWEP.DrawCrosshair = falseSWEP.Spawnable = trueSWEP.AdminsSpawnable = falseSWEP.Primary.ClipSize = -1SWEP.Primary.DefaultClip = -1SWEP.Primary.Automatic = trueSWEP.Primary.Delay = 1.2SWEP.Primary.Ammo = "none"SWEP.Secondary.ClipSize = 1SWEP.Secondary.DefaultClip = 1SWEP.Secondary.Automatic = falseSWEP.Secondary.Ammo = "slam"SWEP.Primary.Delay = 3function SWEP:Reload()endfunction SWEP:Think()endfunction SWEP:throw_attack(model)	self.BaseClass.ShootEffects(self)	if CLIENT then return end	local ent = ents.Create ("prop_physics")	ent:SetModel(model)	ent:SetPos(self.Owner:EyePos() + (self.Owner:GetAimVector() * 16))	ent:SetAngles(self.Owner:EyeAngles())	ent:Spawn()	local phys = ent:GetPhysicsObject()	phys:ApplyForceCenter(self.Owner:GetAimVector():GetNormalized() * 2500)	cleanup.Add(self.Owner, "props", ent)	undo.Create("Rock")	undo.AddEntity(ent)	undo.SetPlayer(self.Owner)	undo.Finish() endfunction SWEP:PrimaryAttack()	self.Weapon:SetNextPrimaryFire(CurTime() + 0.3)	local ang = self.Owner:GetAimVector()	local spos = self.Owner:GetShootPos()	local trace = {}	trace.start = spos	trace.endpos = spos + (ang * 150)	trace.filter = self.Owner		local tr = util.TraceLine(trace)		if tr.HitNonWorld then		local bullet = {}		bullet.Num=5		bullet.Src = self.Owner:GetShootPos()		bullet.Dir= self.Owner:GetAimVector()		bullet.Spread = Vector(0.2,0.2,0.2)		bullet.Tracer = 0		bullet.Force = 10		ullet.Damage = 10		self.Owner:FireBullets(bullet)		self.Weapon:SendWeaponAnim(ACT_VM_HITCENTER)		table.insert(self.plasmatable,self.plasma)	endendfunction SWEP:SecondaryAttack()		self:throw_attack("models/props_junk/rock001a.mdl") 		self:TakeSecondaryAmmo( 1 ) 		self.Owner:ViewPunch( Angle( -1, 1, 0 ) ) 	end