V_Model Texture Changing?

In lua, Is there a way to change the material of the v_model of a weapon? If so, how?

Example:
http://img152.imageshack.us/i/domrebellion0000.jpg/[

Something like:
[lua]
local pMeta = FindMetaTable(“Player”)

function pMeta:SetViewModelMaterial(mat)
local viewModel = self:GetViewModel()
viewModel:SetMaterial(mat)
end

concommand.Add(“set_viewmodel_material”, function(ply, cmd, args)
ply:SetViewModelMaterial(args[1])
end)
[/lua]

Then you can use, for example, “set_viewmodel_material models/shiny” in console to set your view models material to a “models/shiny”.

Alright, I’ll try that.

SetMaterial is going to set the hands’ materials too. Use http://wiki.garrysmod.com/?title=IMaterial.SetMaterialVector