Players

Description

Players in the game are listed after the game starts. It is the object that contains the player clients connecting to the ReWorld game server.

Properties

        string    Name
    The custom name of this object.

        string    ClassName
    The object-type name.

        int    MaxPlayers
    The maximum number of players the current game can hold.

        int    MinPlayers
    The minimum number of players required for the game to start-up.

        bool    CharacterAutoLoads
    Whether to automatically generate avatars or not.

Functions

    AddPlayer(player)
    Adds the target player into Players.

    RemovePlayer(player)
    Removes the target player from Players.

    GetPlayerByUserId(PlayerId)
    Retrieves a player object according to the given PlayerId.

    GetAllPlayers()
    Retrieves all player objects in its own list.

    GetLocalPlayer()
    Retrieves the local player object from the client.

Events

    PlayerDead(Playerid)
    This event is triggered when the player in the list dies.

    PlayerAdded(Playerid)
    This event is triggered when a player is added.

    PlayerLeave(Playerid)
    This event is triggered when the player leaves the list.