Search Results for

    Show / Hide Table of Contents

    Class API

    Provides vital functionality to interact with RAGECOOP

    Inheritance
    Object
    API
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: RageCoop.Client.Scripting
    Assembly: RageCoop.Client.dll
    Syntax
    public static class API

    Properties

    CurrentVersion

    Get the version of RAGECOOP

    Declaration
    public static string CurrentVersion { get; }
    Property Value
    Type Description
    String

    IsChatFocused

    Check if the RAGECOOP chat is visible

    Declaration
    public static bool IsChatFocused { get; }
    Property Value
    Type Description
    Boolean

    IsMenuVisible

    Check if a RAGECOOP menu is visible

    Declaration
    public static bool IsMenuVisible { get; }
    Property Value
    Type Description
    Boolean

    IsOnServer

    Check if the player is already on a server

    Declaration
    public static bool IsOnServer { get; }
    Property Value
    Type Description
    Boolean

    IsPlayerListVisible

    Check if the RAGECOOP list of players is visible

    Declaration
    public static bool IsPlayerListVisible { get; }
    Property Value
    Type Description
    Boolean

    LocalPlayerID

    Get the local player's ID

    Declaration
    public static int LocalPlayerID { get; }
    Property Value
    Type Description
    Int32

    PlayerID

    Logger

    Get a Logger that RAGECOOP is currently using.

    Declaration
    public static Logger Logger { get; }
    Property Value
    Type Description
    Logger

    Methods

    Disconnect()

    Disconnect from the server

    Declaration
    public static void Disconnect()

    LocalChatMessage(String, String)

    Send a local chat message to this player

    Declaration
    public static void LocalChatMessage(string from, string message)
    Parameters
    Type Name Description
    String from

    Name of the sender

    String message

    The player's message

    QueueAction(Action)

    Queue an action to be executed on next tick.

    Declaration
    public static void QueueAction(Action a)
    Parameters
    Type Name Description
    Action a

    RegisterCustomEventHandler(Int32, Action<CustomEventReceivedArgs>)

    Register an handler to the specifed event hash, one event can have multiple handlers. This will be invoked from backgound thread, use QueueAction(Action) in the handler to dispatch code to script thread.

    Declaration
    public static void RegisterCustomEventHandler(int hash, Action<CustomEventReceivedArgs> handler)
    Parameters
    Type Name Description
    Int32 hash

    An unique identifier of the event, you can hash your event name with Hash(String)

    Action<CustomEventReceivedArgs> handler

    An handler to be invoked when the event is received from the server.

    SendCustomEvent(Int32, List<Object>)

    Send an event and data to the server.

    Declaration
    public static void SendCustomEvent(int eventHash, List<object> args)
    Parameters
    Type Name Description
    Int32 eventHash

    An unique identifier of the event

    List<Object> args

    The objects conataing your data, see CustomEventReceivedArgs for a list of supported types

    SendCustomEvent(Int32, Object[])

    Send an event and data to the server.

    Declaration
    public static void SendCustomEvent(int eventHash, params object[] args)
    Parameters
    Type Name Description
    Int32 eventHash
    Object[] args
    In This Article
    Back to top Generated by DocFX