Search Results for

    Show / Hide Table of Contents

    Class Client

    Represent a player connected to this server.

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

    Properties

    DisplayNameTag

    Gets or sets whether to enable automatic respawn for this client's main ped.

    Declaration
    public bool DisplayNameTag { get; set; }
    Property Value
    Type Description
    Boolean

    EnableAutoRespawn

    Gets or sets whether to enable automatic respawn for this client's main ped.

    Declaration
    public bool EnableAutoRespawn { get; set; }
    Property Value
    Type Description
    Boolean

    EndPoint

    Th client's IP address and port.

    Declaration
    public IPEndPoint EndPoint { get; }
    Property Value
    Type Description
    IPEndPoint

    InternalEndPoint

    Internal(LAN) address of this client, used for NAT hole-punching

    Declaration
    public IPEndPoint InternalEndPoint { get; }
    Property Value
    Type Description
    IPEndPoint

    IsReady

    Indicates whether the client has succefully loaded all resources.

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

    Latency

    The client's latency in seconds.

    Declaration
    public float Latency { get; }
    Property Value
    Type Description
    Single

    Player

    The ServerPed instance representing the client's main character.

    Declaration
    public ServerPed Player { get; }
    Property Value
    Type Description
    ServerPed

    Username

    The client's username.

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

    Methods

    Kick(String)

    Kick this client

    Declaration
    public void Kick(string reason = "You have been kicked!")
    Parameters
    Type Name Description
    String reason

    Kick(String[])

    Kick this client

    Declaration
    public void Kick(params string[] reasons)
    Parameters
    Type Name Description
    String[] reasons

    Reasons to kick

    SendChatMessage(String, String)

    Send a chat messsage to this client, not visible to others.

    Declaration
    public void SendChatMessage(string message, string from = "Server")
    Parameters
    Type Name Description
    String message
    String from

    SendCustomEvent(Int32, Object[])

    Trigger a CustomEvent for this client

    Declaration
    public void SendCustomEvent(int hash, params object[] args)
    Parameters
    Type Name Description
    Int32 hash

    An unique identifier of the event, you can use Hash(String) to get it from a string

    Object[] args

    Arguments

    SendCustomEventQueued(Int32, Object[])

    Send a CustomEvent that'll be queued at client side and invoked from script thread

    Declaration
    public void SendCustomEventQueued(int hash, params object[] args)
    Parameters
    Type Name Description
    Int32 hash
    Object[] args

    SendNativeCall(Hash, Object[])

    Send a native call to client and ignore it's response.

    Declaration
    public void SendNativeCall(Hash hash, params object[] args)
    Parameters
    Type Name Description
    Hash hash
    Object[] args

    SendNativeCall<T>(Action<Object>, Hash, Object[])

    Send a native call to client and do a callback when the response received.

    Declaration
    public void SendNativeCall<T>(Action<object> callBack, Hash hash, params object[] args)
    Parameters
    Type Name Description
    Action<Object> callBack
    Hash hash
    Object[] args
    Type Parameters
    Name Description
    T

    Type of the response

    In This Article
    Back to top Generated by DocFX