Author Topic: hiding player when weapon equipped...  (Read 973 times)

when a specific weapon is equipped how would you make it hide the whole player and make him invisible?


Code: [Select]
WeaponImage::OnMount(%this,%obj,%slot){
for (%i = 0; $accent[%i] !$= ""; %i++) %obj.hideNode($accent[%i]);
for (%i = 0; $chest[%i] !$= ""; %i++) %obj.hideNode($chest[%i]);
for (%i = 0; $hat[%i] !$= ""; %i++) %obj.hideNode($hat[%i]);
for (%i = 0; $hip[%i] !$= ""; %i++) %obj.hideNode($hip[%i]);
for (%i = 0; $LArm[%i] !$= ""; %i++) %obj.hideNode($LArm[%i]);
for (%i = 0; $LHand[%i] !$= ""; %i++) %obj.hideNode($LHand[%i]);
for (%i = 0; $LLeg[%i] !$= ""; %i++) %obj.hideNode($LLeg[%i]);
for (%i = 0; $pack[%i] !$= ""; %i++) %obj.hideNode($pack[%i]);
for (%i = 0; $RArm[%i] !$= ""; %i++) %obj.hideNode($RArm[%i]);
for (%i = 0; $RHand[%i] !$= ""; %i++) %obj.hideNode($RHand[%i]);
for (%i = 0; $RLeg[%i] !$= ""; %i++) %obj.hideNode($RLeg[%i]);
for (%i = 0; $secondPack[%i] !$= ""; %i++) %obj.hideNode($secondPack[%i]);
}

also:
Code: [Select]
function WeaponImage::onUnMount(%this,%obj,%slot){%obj.client.applyBodyParts();%obj.client.applyBodyColors();}
Use as well as MrPickle's code. It won't work for bots - errors...

where would i put this in the .cs?  :panda:

At the bottom of the file, be sure to change weapon to the name of the weapon.