Weapon Skins - Issue with Setting a New Material on a View Model.

Hi Guys,

I’m trying to Re-Skin a standard CSS Weapon Model in TTT.
So far no issues with the world model at all and after a bit of advice, i’ve managed to also paint the view model but with some issues.

For some reason, Painting the view model also paints the hands. As seen in the image below.

After some advice i have tried SWEP.UseHands = true to no avail.

Here is the code im using.


function SWEP:DrawWorldModel() 
	self:SetMaterial("skins/ak47/w_rif_ak47/w_rif_ak47") 
	self:DrawModel() 
end

function SWEP:PreDrawViewModel(vm)
     vm:SetMaterial("skins/ak47/rif_ak47/rif_ak47skin1")
     self:SetMaterial("skins/ak47/rif_ak47/rif_ak47skin1")
end

function SWEP:ViewModelDrawn(vm)
vm:SetMaterial("")
end

Any Suggestions?

Get the AK’s viewmodel material path and do something like this:



function SWEP:DrawWorldModel() 
	self:SetMaterial("skins/ak47/w_rif_ak47/w_rif_ak47") 
	self:DrawModel() 
end

function SWEP:PreDrawViewModel(vm)
local mat = Material("PathHere")
     mat:SetMaterial("skins/ak47/rif_ak47/rif_ak47skin1")
end

Use SWEP.UseHands in addition to c_rif_ak47. If your weapon has ironsights remake them in SCK.

The c model solved the issue, thanks.