Table of Contents

Class FiveM

Namespace
OpenGSQ.Protocols
Assembly
OpenGSQ.dll
public class FiveM : ProtocolBase
Inheritance
FiveM
Inherited Members

Constructors

FiveM(string, int, int)

Initializes a new instance of the FiveM class.

public FiveM(string host, int port, int timeout = 5000)

Parameters

host string

The host to connect to.

port int

The port to connect to.

timeout int

The connection timeout in milliseconds. Default is 5 seconds.

Properties

FullName

Gets the full name of the protocol.

public override string FullName { get; }

Property Value

string

Methods

GetDynamic()

Asynchronously gets dynamic information from the server.

public Task<Dictionary<string, JsonElement>> GetDynamic()

Returns

Task<Dictionary<string, JsonElement>>

A task that represents the asynchronous operation. The task result contains the dynamic information.

GetInfo()

Asynchronously gets information about the server.

public Task<Dictionary<string, JsonElement>> GetInfo()

Returns

Task<Dictionary<string, JsonElement>>

A task that represents the asynchronous operation. The task result contains the server information.

GetPlayers()

Asynchronously gets the list of players from the server.

public Task<List<JsonElement>> GetPlayers()

Returns

Task<List<JsonElement>>

A task that represents the asynchronous operation. The task result contains the list of players.