As the title says, particles appear to the client holding the swep but no one else.
[CODE]
function SWEP:Think()
if (SERVER) then return end;
if (self:GetNetworkedBool("IsAlive")) then
if (!self.hasHooked) then
self.hasHooked = true
hook.Add("CalcView", "MyCalcView", MyCalcView)
end
self.SmokeTimer = self.SmokeTimer or 0
if ( self.SmokeTimer > CurTime() ) then return end
self.SmokeTimer = CurTime() + 0.03
local vOffset = self.Owner:LocalToWorld( vector_origin ) + Vector( math.Rand( -3, 3 ), math.Rand( -3, 3 ), math.Rand( -3, 3 ) )
local vNormal = (vOffset - self.Owner:EyePos()):GetNormalized()
local particle = self.emitter:Add("particles/smokey", vOffset)
particle:SetVelocity( vNormal * math.Rand( 20, 50 ) )
particle:SetDieTime( 4.0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.Rand( 100, 130 ) ) -- 20, 36
particle:SetEndSize( math.Rand( 18, 36 ) ) --24, 48
particle:SetRoll( math.Rand( -0.5, 0.5 ) )
particle:SetColor( 50, 50, 50 )
else
if (self.hasHooked) then
self.hasHooked = false
hook.Remove("CalcView", "MyCalcView")
end
end
end
[/CODE]
Any help is appreciated.
Sorry, you need to Log In to post a reply to this thread.