// #autoload // #name = HideMissile // #version = 1.0 // #date = June 24, 2002 // #author = Frosty (edited by NixFix) // #email = frostycubes@earthink.net // #description = Hides your missile launcher when mounted. // #status = Finished? if(!isObject(FrostyHR)) { new ScriptObject(FrostyHR) { class = FrostyHR; }; } package FrostyHideRifle { // -------- Convert slot numbers to weapon names ------- function clientCmdSetWeaponsHudBitmap(%slot, %name, %bitmap) { FrostyHR.weaponName[%slot] = %name; parent::clientCmdSetWeaponsHudBitmap(%slot, %name, %bitmap); } function clientCmdSetWeaponsHudActive(%slot) { FrostyHR.setWeapons(%slot); parent::clientCmdSetWeaponsHudActive(%slot); } function FrostyHR::setWeapons(%this, %slot) { if(%slot != -1) %this.hideRifle(%this.weaponName[%slot]); } // ----------------------------------------------------- function FrostyHR::hideRifle(%this, %weapon) { if(%weapon $= "MissileLauncher") $pref::Player::renderMyItems = "0"; else $pref::Player::renderMyItems = "1"; } }; activatePackage(FrostyHideRifle);