# Add Player To Player Group

Grammar — Add player p to g|Player Group
FlagsNative | Action

Adds a player to a player group.

# Arguments

  • playergroup — Group
  • int — Player

Returns — void

native void PlayerGroupAdd(
	playergroup inGroup,
	int inPlayer,
);

Category: Player Group / Groups

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L556
PlayerGroupAdd(gv_zergPlayers, gv_p2_ZERG_ORANGE_NW)
// L557
PlayerGroupAdd(gv_zergPlayers, gv_p3_ZERG_LIGHTBLUE_SE)
// L558
PlayerGroupAdd(gv_zergPlayers, gv_p5_ZERG_TACTICALPHASE)
// L559
PlayerGroupAdd(gv_zergPlayers, gv_p6_ZERG_NOAIPREPLACED)
// L555
PlayerGroupAdd(gv_zergPlayerGroup, gv_pLAYER_02_REFUGEES)
// L556
PlayerGroupAdd(gv_zergPlayerGroup, gv_pLAYER_03_INFESTED_REFUGEES)
// L557
PlayerGroupAdd(gv_zergPlayerGroup, gv_pLAYER_04_INFESTEDREFUGEES)
// L956
PlayerGroupAdd(lv_allZerg, gv_p03_VIROPHAGE)
// L957
PlayerGroupAdd(lv_allZerg, gv_p04_ZERG_NORTH)
// L958
PlayerGroupAdd(lv_allZerg, gv_p07_ZERG_INFESTED)
// L959
PlayerGroupAdd(lv_allZerg, gv_p08_ZERG_SOUTH)
// L968
PlayerGroupAdd(gv_zergPlayers, gv_p02_ZERG_EAST)
// L969
PlayerGroupAdd(gv_zergPlayers, gv_p03_VIROPHAGE)
// L970
PlayerGroupAdd(gv_zergPlayers, gv_p04_ZERG_NORTH)
// L971
PlayerGroupAdd(gv_zergPlayers, gv_p05_COLONIST)
// L972
PlayerGroupAdd(gv_zergPlayers, gv_p06_COLONIST)
// L973
PlayerGroupAdd(gv_zergPlayers, gv_p07_ZERG_INFESTED)
// L689
PlayerGroupAdd(gv_dominionPlayerGroup, gv_pLAYER_02_DOMINION)
// L690
PlayerGroupAdd(gv_dominionPlayerGroup, gv_pLAYER_03_DOMINION)
// L691
PlayerGroupAdd(gv_dominionPlayerGroup, gv_pLAYER_04_DOMINION)
// L485
PlayerGroupAdd(gv_enemyPlayers, gv_p02_ORLAN_ENEMY)
// L486
PlayerGroupAdd(gv_enemyPlayers, gv_p04_DOMINION)
// L487
PlayerGroupAdd(gv_miraHanPlayers, gv_p03_MIRA_HAN)
// L354
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p03_DOMINION_WAREHOUSE)
// L355
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p04_DOMINION_INFANTRY_A)
// L356
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p05_DOMINION_FACTORY)
// L357
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p06_DOMINION_STARPORT_A)
// L358
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p07_DOMINION_STARPORT_B)
// L359
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p08_DOMINION_INFANTRY_B)
// L360
PlayerGroupAdd(gv_dominionEnemyGroup, gv_p10_DOMINION_LOKI)
// L828
PlayerGroupAdd(gv_dominionPlayers, gv_p02_DOMINION_INFANTRY)
// L829
PlayerGroupAdd(gv_dominionPlayers, gv_p03_DOMINION_SIEGE)
// L830
PlayerGroupAdd(gv_dominionPlayers, gv_p04_DOMINION_AIR)
// L831
PlayerGroupAdd(gv_dominionPlayers, gv_p05_DOMINION_RAIDER)
// L832
PlayerGroupAdd(gv_dominionPlayers, gv_p08_DOMINION)
// L578
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER02_ZERG)
// L579
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER03_ZERG)
// L580
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER04_ZERG)
// L581
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER05_ZERG_NOAI)
// L351
PlayerGroupAdd(gv_zergPlayers, gv_p02_ZERG)
// L352
PlayerGroupAdd(gv_zergPlayers, gv_p04_ZERG)
// L710
PlayerGroupAdd(gv_protossPlayerGroup, gv_p2_PROTOSS_EAST_ATTACKERS)
// L711
PlayerGroupAdd(gv_protossPlayerGroup, gv_p3_PROTOSS_SCRIPTED)
// L712
PlayerGroupAdd(gv_protossPlayerGroup, gv_p4_PROTOSS_WEST_ESCORTS)
// L566
PlayerGroupAdd(gv_raynorsRaiders, gv_p2_RAYNOR_LIGHTBLUE)
// L567
PlayerGroupAdd(gv_raynorsRaiders, gv_p8_ALLIED_PINK)
// L568
PlayerGroupAdd(gv_raynorsRaiders, gv_p9_ALLIED_GREEN)
// L595
PlayerGroupAdd(gv_dominionPlayers, gv_p3_DOMINION_RED)
// L596
PlayerGroupAdd(gv_dominionPlayers, gv_p4_DOMINION_PURPLE)
// L597
PlayerGroupAdd(gv_dominionPlayers, gv_p5_DOMINION_GREY)
// L598
PlayerGroupAdd(gv_dominionPlayers, gv_p6_DOMINION_ORANGE)
// L342
PlayerGroupAdd(gv_protossPlayers, gv_p3_TEMPLE)
// L343
PlayerGroupAdd(gv_protossPlayers, gv_p4_LOWER_CAUSEWAY)
// L344
PlayerGroupAdd(gv_protossPlayers, gv_p5_UPPER_CAUSEWAY)
// L345
PlayerGroupAdd(gv_protossPlayers, gv_p6_FIRST_PROTOSS)
// L435
PlayerGroupAdd(gv_protossPlayerGroup, gv_p2_NE_PROTOSSMiddle)
// L436
PlayerGroupAdd(gv_protossPlayerGroup, gv_p3_WARPEDINPROTOSS)
// L437
PlayerGroupAdd(gv_protossPlayerGroup, gv_p4_SE_PROTOSSRight)
// L438
PlayerGroupAdd(gv_protossPlayerGroup, gv_p5_NW_PROTOSSLeft)
// L439
PlayerGroupAdd(gv_protossPlayerGroup, gv_p6_PROTOSSAir)
// L309
PlayerGroupAdd(gv_protossPlayers, gv_pLAYER02_PROTOSS)
// L310
PlayerGroupAdd(gv_protossPlayers, gv_pLAYER03_PROTOSS)
// L311
PlayerGroupAdd(gv_protossPlayers, gv_pLAYER04_PROTOSS)
// L428
PlayerGroupAdd(gv_fORCEBADGUYS, gv_pLAYER_02_ScriptedTOSS)
// L429
PlayerGroupAdd(gv_fORCEBADGUYS, gv_pLAYER_03_HighTOSS)
// L430
PlayerGroupAdd(gv_fORCEBADGUYS, gv_pLAYER_04_DarkTOSS)
// L431
PlayerGroupAdd(gv_fORCEGOOD_GUYS, gv_pLAYER_01_USER)
// L432
PlayerGroupAdd(gv_fORCEGOOD_GUYS, gv_pLAYER_06_VALERIAN)
// L891
PlayerGroupAdd(gv_zergPlayers, gv_p02_ZERG_PURPLE_NE)
// L892
PlayerGroupAdd(gv_zergPlayers, gv_p05_ZERG_ORANGE_NW)
// L893
PlayerGroupAdd(gv_zergPlayers, gv_p06_ZERG_GREEN_SW)
// L894
PlayerGroupAdd(gv_zergPlayers, gv_p07_ZERG_PINK)
// L752
PlayerGroupAdd(gv_zergPlayers, gv_p2_ZERG)
// L753
PlayerGroupAdd(gv_zergPlayers, gv_p5_EGGS)
// L688
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P03_ZERG_BR)
// L689
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P04_ZERG_BL)
// L690
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P05_ZERG_TL)
// L691
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P06_ZERG_TR)
// L692
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P07_ZERG_EXP)
// L693
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P08_MUTALISK_TOWERS)
// L694
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P10_LEVIATHAN)
// L767
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_ZERG_MAIN)
// L768
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_ZERG_SOUTH)
// L769
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_ZERG_EAST)
// L770
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_ZERG_SPECIAL)
// L405
PlayerGroupAdd(gv_zergPlayers, gv_p04_ZERG_NW)
// L406
PlayerGroupAdd(gv_zergPlayers, gv_p05_ZERG_NE)
// L407
PlayerGroupAdd(gv_zergPlayers, gv_p06_ZERG_SE)
// L408
PlayerGroupAdd(gv_zergPlayers, gv_p07_FRENZIED_ZERG)
// L332
PlayerGroupAdd(gv_allEnemyPlayers, gv_p2_ENEMY_ZERG)
// L333
PlayerGroupAdd(gv_allEnemyPlayers, gv_p3_ENEMY_PROTOSS)
// L556
PlayerGroupAdd(gv_zergPlayers, gv_p2_ZERG_ORANGE_NW)
// L557
PlayerGroupAdd(gv_zergPlayers, gv_p3_ZERG_LIGHTBLUE_SE)
// L558
PlayerGroupAdd(gv_zergPlayers, gv_p5_ZERG_TACTICALPHASE)
// L559
PlayerGroupAdd(gv_zergPlayers, gv_p6_ZERG_NOAIPREPLACED)
// L555
PlayerGroupAdd(gv_zergPlayerGroup, gv_pLAYER_02_REFUGEES)
// L556
PlayerGroupAdd(gv_zergPlayerGroup, gv_pLAYER_03_INFESTED_REFUGEES)
// L557
PlayerGroupAdd(gv_zergPlayerGroup, gv_pLAYER_04_INFESTEDREFUGEES)
// L956
PlayerGroupAdd(lv_allZerg, gv_p03_VIROPHAGE)
// L957
PlayerGroupAdd(lv_allZerg, gv_p04_ZERG_NORTH)