Custom Skins // Sweps

Hey Guys.

Iam started to programming my own Gamemode.
now I wanted to test a skin for models, so i made a SWEP with the AK47 model from CSS.
i copied the folder to make a second one with a Goldskin. but the second looks identical to the first one. is there an SWEP command to load a custom material?

thanks for your hlep

Possibly:



SWEP:Initialize()
    self:SetMaterial( "skin file" )
end


First off: you’ll need to apply the material to the viewmodel to have any effect (so use GetViewModel()), and secondly, that’ll apply a material over the whole model (including the hands).

The best way to apply a different skin is to change the basetexture. I wrote some code for this a few days ago (which could be adapted for this):
http://www.facepunch.com/threads/1089200-What-are-you-working-on-V5-Nothing-to-see-here-folks?p=31438540&viewfull=1#post31438540