How to Change Materials

How can I replace this material: “cs_havana/ground01grass”

I want to change it to: “ground/blendsnow_asphault”

Materal(“cs_havana/ground01grass”):SetMaterialTexture("$basetexture", Material(“ground/blendsnow_asphault”):GetMaterialTexture("$basetexture"))
Not tested

I tried this:

local cursign = Material “cs_havana/ground01grass”
local newsign = Material “ground/blendsnow_asphault”
cursign:SetMaterialTexture( “$basetexture”, newsign:GetMaterialTexture"$basetexture")
cursign:SetMaterialTexture( “$bumpmap”, newsign:GetMaterialTexture"$bumpmap" )

And that didn’t work.

Edit: Nevermind I got it, I thought that it would be a server side thing. But it was client side. Thanks for the help.

When/where did you try it?

Thanks for the help. I got it working.

I messed around with this and found the console command “mat_crosshair” to be proved extremely useful when replacing map textures that have been changed in hammar, as they use a different name.