Is there any way I can change the item image in pointshop, to something else insead of the .mdl file model?
So for example, in this code I'd like to change the image displayed in pointshop from the ITEM.Model = 'models/gmod_tower/afro.mdl' to a custom image of a black person with a afro, in a .png or something, as the pointshop image.
[code]ITEM.Name = 'Afro 2'
ITEM.Price = 200
ITEM.Model = 'models/gmod_tower/afro.mdl'
ITEM.Attachment = 'eyes'
function ITEM:OnEquip(ply, modifications)
ply:PS_AddClientsideModel(self.ID)
end
function ITEM:OnHolster(ply)
ply:PS_RemoveClientsideModel(self.ID)
end
function ITEM:ModifyClientsideModel(ply, model, pos, ang)
--model:SetModelScale(1.6, 0)
pos = pos + (ang:Up() * 2.5) + (ang:Forward() * -4.5)
--ang:RotateAroundAxis(ang:Up(), -90)
--ang:RotateAroundAxis(ang:Forward(), -180)
return model, pos, ang
end
[/code]
yes
Use
ITEM.Material = "pathtomaterial.vmt"
[QUOTE=BFG9000;43168791]yes
Use
ITEM.Material = "pathtomaterial.vmt"[/QUOTE]
So I have to make a image into a vmt first then right?
yes
I don't know if I did anything wrong but that didn't work..
I changed my image into a targa, then converted into a vtf and vmt. The image is just blank now. Did I do something wrong?
^^^There's your fucking problem lol
go to your pointshop folder and put the vtf and vmt under /materials (if there isn't one, create it) then change the vmt to "$basetexture" "materials/fireicon"
and in your pointshop item don't forget to make a resource.AddFile(your VMT here) and put the material on your FastDL so players can see it
Sorry, you need to Log In to post a reply to this thread.