# Enable/Disable Melee Option For Player

Grammarvalue|Enable/Disable option melee option for player player
FlagsNative | Action

Enables or disables a melee option for the specified player.

# Arguments

Returns — void

native void MeleeSetOption(
	int player,
	int option,
	bool value,
);

Category: Melee / Player Settings

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:12437

        lv_indexPlayer = PlayerGroupNextPlayer(autoFBC5769B_g, lv_indexPlayer);
        if (lv_indexPlayer < 0) { break; }
        MeleeSetOption(lv_indexPlayer, c_meleeOptionPoints, true);
        PlayerSetState(lv_indexPlayer, c_playerStateXPGain, true);
        UserDataSetInt("PlayerCommanders", libCOOC_gf_ActiveCommanderForPlayer(lv_indexPlayer), "InThisMission", 1, 1);

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:253

        lv_p = PlayerGroupNextPlayer(auto373C6EF4_g, lv_p);
        if (lv_p < 0) { break; }
        MeleeSetOption(lv_p, c_meleeOptionXPGainDisable, false);
        libNtve_gf_SetUpgradeLevelForPlayer(lv_p, "War3_FreeHeroSlots", 1);
        autoACA08899_userType = "MeleeSetting_HeroLimit";

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:578

        lv_p = PlayerGroupNextPlayer(auto71B3A3EC_g, lv_p);
        if (lv_p < 0) { break; }
        MeleeSetOption(lv_p, c_meleeOptionXPGainDisable, false);
        PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
        PlayerOptionOverride(lv_p, "gametooltips", "1");

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2194

        PlayerOptionOverride(lv_player, "selectuncontrolable", "1");
        PlayerOptionOverride(lv_player, "showcurrentordermodel", "0");
        MeleeSetOption(lv_player, c_meleeOptionXPGainDisable, false);
        auto38C35668_g = UnitGroupSearch(null, 15, PlayerStartLocation(lv_player), 10.0, UnitFilter(0, 0, (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
        auto38C35668_u = UnitGroupCount(auto38C35668_g, c_unitCountAll);