sm.player

Associated object type: Player

A player is a user playing the game. Every player controls a Character in the world.

Functions:

  • getAllPlayers
  • getHostPlayer

  • sm.player.getAllPlayers(getInactive?)

    Returns a table of all players that are currently in the game.

    Parameters:

    TypeNameDescription
    booleangetInactive?Include getting inactive players. Defaults to false. (Optional)

    Returns:

    TypeDescription
    tableTable of all players in the game. {Player, ..}

    sm.player.getHostPlayer()

    Returns the player of the game host.

    Returns:

    TypeDescription
    PlayerThe host player.