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


    self:SetMaterial( "skin file" )

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):