• How to Change Materials
    5 replies, posted
How can I replace this material: "cs_havana/ground01grass" I want to change it to: "ground/blendsnow_asphault"
[lua] Materal("cs_havana/ground01grass"):SetMaterialTexture("$basetexture", Material("ground/blendsnow_asphault"):GetMaterialTexture("$basetexture")) [/lua] Not tested
I tried this: [lua] local cursign = Material "cs_havana/ground01grass" local newsign = Material "ground/blendsnow_asphault" cursign:SetMaterialTexture( "$basetexture", newsign:GetMaterialTexture"$basetexture") cursign:SetMaterialTexture( "$bumpmap", newsign:GetMaterialTexture"$bumpmap" ) [/lua] 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.
Sorry, you need to Log In to post a reply to this thread.