# Turn Player Flag On/Off

Grammar — Turn player player state flag value
FlagsNative | Action

Enables or disables the specified flag for the player.

# Arguments

Returns — void

native void PlayerSetState(
	int inPlayer,
	int inState,
	bool inVal,
);

Category: Player / Player Settings

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L2823
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, false)
// L2940
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, true)
// L2665
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, false)
// L2804
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, true)
// L2810
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, false)
// L2959
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, true)
// L6247
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5346
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L529
PlayerSetState(gv_pLAYER03_COLONIST, c_playerStateDisplayInLeaderPanel, false)
// L530
PlayerSetState(gv_pLAYER05_COLONISTSTRUCTURES, c_playerStateDisplayInLeaderPanel, false)
// L531
PlayerSetState(gv_pLAYER06_TERRORFLEET, c_playerStateDisplayInLeaderPanel, false)
// L532
PlayerSetState(gv_pLAYER07_RESOURCES, c_playerStateDisplayInLeaderPanel, false)
// L6530
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L988
PlayerSetState(gv_p03_VIROPHAGE, c_playerStateDisplayInLeaderPanel, false)
// L989
PlayerSetState(gv_p05_COLONIST, c_playerStateDisplayInLeaderPanel, false)
// L990
PlayerSetState(gv_p06_COLONIST, c_playerStateDisplayInLeaderPanel, false)
// L991
PlayerSetState(gv_p07_ZERG_INFESTED, c_playerStateDisplayInLeaderPanel, false)
// L704
PlayerSetState(gv_pLAYER_05_ABANDONEDVEHICLES, c_playerStateDisplayInLeaderPanel, false)
// L5825
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L5448
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L5585
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L5659
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L5484
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L5697
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L5819
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L861
PlayerSetState(gv_p06_CIVILIANS, c_playerStateShowScore, false)
// L862
PlayerSetState(gv_p07_HORNERBASE, c_playerStateShowScore, false)
// L2126
PlayerSetState(gv_p06_CIVILIANS, c_playerStateFidgetingEnabled, false)
// L6297
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L6486
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L6561
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L6823
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L7028
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L752
PlayerSetState(gv_p07_NEUTRAL, c_playerStateShowScore, false)
// L11258
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L11410
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L11599
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L11739
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L11980
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L12095
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L12178
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L12435
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L12688
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L375
PlayerSetState(gv_p2_DOMINION_RED, c_playerStateFidgetingEnabled, false)
// L376
PlayerSetState(gv_p4_ACTORS_BLUE, c_playerStateFidgetingEnabled, false)
// L377
PlayerSetState(gv_p3_RIKSVILLE_YELLOW, c_playerStateDisplayInLeaderPanel, false)
// L378
PlayerSetState(gv_p4_ACTORS_BLUE, c_playerStateDisplayInLeaderPanel, false)
// L2494
PlayerSetState(gv_p3_RIKSVILLE_YELLOW, c_playerStateFidgetingEnabled, true)
// L4899
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5054
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L5151
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L5307
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5423
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L412
PlayerSetState(gv_pLAYER_03_COLONISTS, c_playerStateShowScore, false)
// L413
PlayerSetState(gv_pLAYER_04_REBELS, c_playerStateShowScore, false)
// L414
PlayerSetState(gv_pLAYER_05_PATROL, c_playerStateShowScore, false)
// L4842
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L594
PlayerSetState(gv_pLAYER05_ZERG_NOAI, c_playerStateDisplayInLeaderPanel, false)
// L595
PlayerSetState(gv_pLAYER06_REBELS, c_playerStateDisplayInLeaderPanel, false)
// L596
PlayerSetState(gv_pLAYER07_HYPERION, c_playerStateDisplayInLeaderPanel, false)
// L597
PlayerSetState(gv_pLAYER08_TAUREN, c_playerStateDisplayInLeaderPanel, false)
// L598
PlayerSetState(gv_pLAYER09_COLONISTS, c_playerStateDisplayInLeaderPanel, false)
// L5080
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L5040
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L4244
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L633
PlayerSetState(gv_p4_DOMINION_PURPLE, c_playerStateShowScore, false)
// L634
PlayerSetState(gv_p5_DOMINION_GREY, c_playerStateShowScore, false)
// L635
PlayerSetState(gv_p6_DOMINION_ORANGE, c_playerStateShowScore, false)
// L636
PlayerSetState(gv_p7_PRISONER_YELLOW, c_playerStateShowScore, false)
// L637
PlayerSetState(gv_p8_ALLIED_PINK, c_playerStateShowScore, false)
// L638
PlayerSetState(gv_p9_ALLIED_GREEN, c_playerStateShowScore, false)
// L639
PlayerSetState(gv_p9_ALLIED_GREEN, c_playerStateShowScore, false)
// L640
PlayerSetState(gv_p11_ALLIED_CELLBLOCK_A, c_playerStateShowScore, false)
// L641
PlayerSetState(gv_p12_ALLIED_CELLBLOCK_B, c_playerStateShowScore, false)
// L645
PlayerSetState(gv_p0_NEUTRAL, c_playerStateFidgetingEnabled, false)
// L534
PlayerSetState(gv_pLAYER03_DROPSHIPS, c_playerStateShowScore, false)
// L535
PlayerSetState(gv_pLAYER04_NOVA, c_playerStateShowScore, false)
// L5957
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L6089
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, true)
// L6237
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L6373
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, true)
// L358
PlayerSetState(gv_p3_TEMPLE, c_playerStateShowScore, false)
// L359
PlayerSetState(gv_p6_FIRST_PROTOSS, c_playerStateShowScore, false)
// L5009
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5167
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5427
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L5659
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L6073
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L3644
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L3854
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, true)
// L3932
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L3934
PlayerSetState(gv_pLAYER02_PROTOSS, c_playerStateFidgetingEnabled, false)
// L3935
PlayerSetState(gv_pLAYER03_PROTOSS, c_playerStateFidgetingEnabled, false)
// L3936
PlayerSetState(gv_pLAYER04_PROTOSS, c_playerStateFidgetingEnabled, false)
// L4850
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L4980
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, true)
// L5084
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L5280
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, true)
// L5513
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L5659
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, true)