// #autoload // #name = BK QuickCmdMap // #version = 1.0 // #date = 26 June 2003 // #author = BlackKnight' // #warrior = BlackKnight' // #description = CC Toggle, settings and prefs // #status = release // #category = BK Scripts // #credit = Halide's script tutorial, Uber's QuietCmdMap and Sweeper for the CC Prefs. Thx guys! // #credit = I pulled this from Various Scripts on slingscripts, please email me if you wrote the original cctoggle.cs! // #include = support/bind_manager.cs function ccToggleCmdMap(%val) { if (%val) { showTaskHudDlg(false); CommanderMapGui.open(); } else CommanderMapGui.close(); } package ccPowerCmdMap { function alxPlay(%sound, %x, %y, %z) { if (%x $= "") return parent::alxPlay(%sound); if (!stricmp(%sound,"CommandMapActivateSound")) return 0; if (!stricmp(%sound,"CommandMapDeactivateSound")) return 0; return parent::alxPlay(%sound, %x, %y, %z); } function CommanderMapGui::open(%this) { parent::open(%this); CommanderTree.openCategory("Clients", $pref::Sweeper::CC::Clients); CommanderTree.openCategory("Tactical", $pref::Sweeper::CC::Tactical); CommanderTree.openCategory("DTactical", $pref::Sweeper::CC::DTactical); CommanderTree.openCategory("Support", $pref::Sweeper::CC::Support); CommanderTree.openCategory("DSupport", $pref::Sweeper::CC::DSupport); CommanderTree.openCategory("Waypoints", $pref::Sweeper::CC::Waypoints); CommanderTree.openCategory("Objectives",$pref::Sweeper::CC::Objectives); CMDShowSensorsButton.setValue($pref::Sweeper::CC::Sensors); CommanderMap.renderSensors = $pref::Sweeper::CC::Sensors; CMDTextButton.setValue($pref::Sweeper::CC::Text); CommanderMap.renderText = $pref::Sweeper::CC::Text; } function CommanderMapGui::onSleep(%this) { parent::onSleep(%this); $pref::Sweeper::CC::Clients = CMDPlayersButton.getValue(); $pref::Sweeper::CC::Tactical = CMDTacticalButton.getValue(); $pref::Sweeper::CC::DTactical = CMDDeployedTacticalButton.getValue(); $pref::Sweeper::CC::Support = CMDMiscButton.getValue(); $pref::Sweeper::CC::DSupport = CMDDeployedMiscButton.getValue(); $pref::Sweeper::CC::Waypoints = CMDWaypointsButton.getValue(); $pref::Sweeper::CC::Objectives = CMDObjectivesButton.getValue(); $pref::Sweeper::CC::Sensors = CMDShowSensorsButton.getValue(); $pref::Sweeper::CC::Text = CMDTextButton.getValue(); } }; activatePackage(ccPowerCmdMap); bindmanager.addbind("\c5BKCommand Circuit", ccToggleCmdMap);