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

    Config

    The client's configuration

    Declaration
    public PlayerConfig Config { get; set; }
    Property Value
    Type Description
    PlayerConfig

    EndPoint

    Th client's IP address and port.

    Declaration
    public IPEndPoint EndPoint { 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 latncy 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

    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, List<Object>)

    Trigger a CustomEvent for this client

    Declaration
    public void SendCustomEvent(int hash, List<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

    List<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
    GTA.Native.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
    GTA.Native.Hash hash
    Object[] args
    Type Parameters
    Name Description
    T

    Type of the response

    In This Article
    Back to top Generated by DocFX