Greetings!
I’m working on a mod where I’d like to implement a feature where the player can select a skin for his weapon using a CVAR. I’ve named the CVAR /cg_mp40skin1 for now. When this is set to 1, it uses an alternate skin for the MP40. I looked at how the medic’s syringe works, since that changes shader once you’re level 3 or above medic. I’ve actually got this “working”. When I set up the CVAR though, other players just see the default skin. Perhaps because the skin selection is not being sent over the net?
Here’s the bit of code:
if (cg_mp40skin1.integer == 1){
cgs.clientinfo[cg.clientNum].mp40skin1 = 1;
}
if( !ps ) {
if ( cgs.clientinfo[ cent->currentState.clientNum ].mp40skin1 == 1 ){
if( weaponNum == WP_MP40 ) {
gun.customShader = weapon->modModels[0];
}
}
}
If anyone could point me in the right direction that would be greatly appreciated 
