get_player_team

Returns the team of the specified player. If team mode is off, it will return the player number.

ArgumentTypeDescription
player:realID of the player to get the team of

Example, called from hit_player.gml:

// this character plays a sound effect when they hit their teammate:
if (get_player_team( hit_player ) == get_player_team( player )) {
sound_play( sound_get( "oops" ));
}