• Making .png masks instead of .mdl's
    7 replies, posted
Hello! I want to have .png files as masks. But the pointshop only uses .mdl's I'm using the pointshop by _undefined. (not that this matters) This is the original LUA code for a .mdl mask; located at the eyes. If anyone could make / edit the code to make the .png files work that would be very appreciated! CODE: [CODE]ITEM.Name = 'Clock Mask' ITEM.Price = 50 ITEM.Model = 'models/props_c17/clock01.mdl' ///<- as you see, .mdl. I want to use .png 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) ang:RotateAroundAxis(ang:Right(), -90) ///<- This makes it turn, should be ignored! return model, pos, ang end[/CODE] [B]For example, this would be a mask (yes boxxy <3)[/B] [IMG]http://i39.tinypic.com/4v0jl0.png[/IMG]
A model and a image/texture are two separate things. If you want you could potentially apply the boxxy image to the clock as a material (vtf) but it would look weird.
[QUOTE=mcd1992;41873030]A model and a image/texture are two separate things. If you want you could potentially apply the boxxy image to the clock as a material (vtf) but it would look weird.[/QUOTE] I have had that in mind too, maybe I can create a 256x256 flat model. and then apply the texture on that?
You could actually just create the model in game using render* and apply the vtf. Or use DHTML and apply the png.
[QUOTE=vexx21322;41873131]You could actually just create the model in game using render* and apply the vtf. Or use DHTML and apply the png.[/QUOTE] If I transfer the PNG into a VTF file, and place it next to the other materials it doesn't show up. And I'm totally not familiar with DHTML, so that's pass xd Anyways thanks for the help!
Just rewrite the part of pointshop thats looping through available items to draw them, and if it ends in .png draw a DImage instead of a DModelPanel, better yet if you don't want to code it or don't know how, put it in as a request on pointshop's github. For the actual drawing of the masks in game a 3d2d image drawn over the players face would work as JamesXX said.
Or you could use an entity with a 3D2D draw, parented to the head of a player.
Thanks, I managed to pull it off with the help of James xX!
Sorry, you need to Log In to post a reply to this thread.