All pastes #571957 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-17 12:42 UTC
rendered paste body
primary

	if SERVER then
		local MuzzlePos = self.Owner:GetShootPos() + (self.Owner:GetRight() * Right) + (self.Owner:GetUp() * Up) + (self.Owner:GetForward() * Forward)
		local ball = ents.Create("proj_shotgunrocket")
		ball:SetPos(MuzzlePos)
		ball:SetOwner(self.Owner)
		ball:SetAngles(self.Owner:GetAimVector())
		ball:Spawn()
		ball:GetPhysicsObject():SetVelocity(self.Owner:GetAimVector()*3000)
	end

secondary

	if SERVER then
		for i=1,4 do
			local MuzzlePos = self.Owner:GetShootPos() + (self.Owner:GetRight() * Right) + (self.Owner:GetUp() * Up) + (self.Owner:GetForward() * Forward)
			local ball = ents.Create("proj_shotgunrocket")
			ball:SetPos(MuzzlePos)
			ball:SetOwner(self.Owner)
			ball:SetAngles(self.Owner:GetAimVector())
			ball:Spawn()
			local ang=self.Owner:GetAimVector()*2000
			ang=ang+Vector(math.random(0,200),math.random(0,200),math.random(0,200))
			ball:GetPhysicsObject():SetVelocity(ang)
		end
	end