Today ive been trying over and over to set a trail to a model on equipt and yeah ive tried "ITEM.Material = "trails/SonicRing.vmt""
and
ply:SetMaterial("trails/SonicRing.vmt")
Neither have work
Help please
Sorry For my english
Check out source code for Trail tool in sandbox.
Make sure [B]trails/SonicRing.vmt[/B] is the exact path. Try this:
[code]ITEM.Name = 'Ring Trail'
ITEM.Price = 150
ITEM.Material = 'trails/SonicRing.vmt'
function ITEM:OnEquip(ply, modifications)
ply.RingTrail = util.SpriteTrail(ply, 0, modifications.color, false, 15, 1, 4, 0.125, self.Material)
end
function ITEM:OnHolster(ply)
SafeRemoveEntity(ply.RingTrail)
end
function ITEM:Modify(modifications)
PS:ShowColorChooser(self, modifications)
end
function ITEM:OnModify(ply, modifications)
SafeRemoveEntity(ply.RingTrail)
self:OnEquip(ply, modifications)
end
[/code]
I dont want it as a buyable trail
i want it equipted when a certain models is equipted
Just add this:[CODE]ply.RingTrail = util.SpriteTrail(ply, 0, modifications.color, false, 15, 1, 4, 0.125, self.Material)[/CODE] To when you equip the model.
As well as all the other stuff like SafeRemoveEntity and so forth.
-Ninja'd-
Sorry, you need to Log In to post a reply to this thread.