namespace RageCoop.Client.Scripting { public static unsafe partial class APIBridge { public static class Config { public static System.String Username => GetConfig("Username"); public static System.Boolean EnableAutoRespawn => GetConfig("EnableAutoRespawn"); public static GTA.BlipColor BlipColor => GetConfig("BlipColor"); public static GTA.BlipSprite BlipSprite => GetConfig("BlipSprite"); public static System.Single BlipScale => GetConfig("BlipScale"); public static System.Boolean ShowPlayerNameTag => GetConfig("ShowPlayerNameTag"); } #region PROPERTIES public static System.Int32 LocalPlayerID => GetProperty("LocalPlayerID"); public static System.Boolean IsOnServer => GetProperty("IsOnServer"); public static System.Net.IPEndPoint ServerEndPoint => GetProperty("ServerEndPoint"); public static System.Boolean IsMenuVisible => GetProperty("IsMenuVisible"); public static System.Boolean IsChatFocused => GetProperty("IsChatFocused"); public static System.Boolean IsPlayerListVisible => GetProperty("IsPlayerListVisible"); public static System.Version CurrentVersion => GetProperty("CurrentVersion"); public static System.Collections.Generic.Dictionary Players => GetProperty>("Players"); #endregion #region FUNCTIONS public static void Connect(System.String address) => InvokeCommand("Connect", address); public static void Disconnect() => InvokeCommand("Disconnect"); public static System.Collections.Generic.List ListServers() => InvokeCommand>("ListServers"); public static void LocalChatMessage(System.String from, System.String message) => InvokeCommand("LocalChatMessage", from, message); public static void SendChatMessage(System.String message) => InvokeCommand("SendChatMessage", message); public static RageCoop.Client.Scripting.ClientResource GetResource(System.String name) => InvokeCommand("GetResource", name); public static RageCoop.Client.Scripting.ClientResource GetResourceFromPath(System.String path) => InvokeCommand("GetResourceFromPath", path); public static System.Object GetConfig(System.String name) => InvokeCommand("GetConfig", name); public static void SetConfig(System.String name, System.String jsonVal) => InvokeCommand("SetConfig", name, jsonVal); public static void RegisterCustomEventHandler(RageCoop.Core.Scripting.CustomEventHash hash, RageCoop.Core.Scripting.CustomEventHandler handler) => InvokeCommand("RegisterCustomEventHandler", hash, handler); #endregion } }