I am adding lots of tf2 unusual effects to my pointshop on my server, but in firstperson they almost block your entire view, is there any way to make them invisible in firstperson?
[code]
game.AddParticles("particles/item_fx.pcf")
ITEM.Name = 'Arcana'
ITEM.Price = 195000
ITEM.Attachment = 'eyes'
ITEM.Material = "vgui/particlepics/arcana.png"
ITEM.Particle = "unusual_spellbook_circle_green"
PrecacheParticleSystem(ITEM.Particle)
function ITEM:OnEquip(ply, modifications)
ParticleEffectAttach(self.Particle, PATTACH_POINT_FOLLOW, ply, ply:LookupAttachment("eyes"))
end
function ITEM:OnHolster(ply)
ply:StopParticles()
end
[/code]
Check in a render hook whether or not the LocalPlayer is being drawn or not, and if the state changes, attach/remove the particle effect.
Wont this be a problem on multiplayer as if I remove the particle effect when going into firstperson, others cant see it?
Only do this if the LocalPlayer is the player the particle effect is being applied to.
Sorry, you need to Log In to post a reply to this thread.