WreckMPGlobals - maceeikodev/WreckMP_Ref GitHub Wiki

Definition

public static class WreckMPGlobals

Set of global events and properties.

Properties

public static bool IsMultiplayerSession { get; } - Returns true if WreckMP is loaded

public static bool IsHost { get; } - Specifies whether the local player is the host of the session. In singleplayer returns true

public static ulong HostID { get; } - Get the Steam ID of the session host. In singleplayer returns 0

public static ulong UserID { get; } - Get the Steam ID of the local player. In singleplayer returns 0

public static Dictionary<ulong, WreckAPI.Player> Players { get; } - Get all players by their Steam ID. In singleplayer returns null

Methods

public static void OnMemberJoin(Action<ulong> callback);

Invoked when a user establishes connection.

public static void OnMemberReady(Action<ulong> callback);

Invoked when a user finishes loading game and WreckMP and is ready to receive events.

public static void OnMemberExit(Action<ulong> callback);

Invoked when a user leaves the session.

public static void OnPlayerModelCreated(Action<GameObject> callback);

Invoked when a player model is created.

⚠️ **GitHub.com Fallback** ⚠️