get_player_name

Returns the name being currently used by the specified player, returning “P1”, “P2”, etc. if the player has no name set.

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

Example, called from post_draw.gml:

// This draws the current player name as debug text under the character:
draw_debug_text(x, y+10, get_player_name( player ));