Table of Contents

Class Server

Namespace
CounterStrikeSharp.API
Assembly
CounterStrikeSharp.API.dll
public class Server
Inheritance
Server

Properties

CurrentTime

public static float CurrentTime { get; }

Property Value

float

EngineTime

public static double EngineTime { get; }

Property Value

double

GameDirectory

public static string GameDirectory { get; }

Property Value

string

GameFrameTime

public static float GameFrameTime { get; }

Property Value

float

MapName

public static string MapName { get; }

Property Value

string

MaxPlayers

public static int MaxPlayers { get; }

Property Value

int

TickCount

public static int TickCount { get; }

Property Value

int

TickInterval

public static float TickInterval { get; }

Property Value

float

TickedTime

public static double TickedTime { get; }

Property Value

double

Methods

ExecuteCommand(string)

public static void ExecuteCommand(string command)

Parameters

command string

GetMapList()

public static string[] GetMapList()

Returns

string[]

IsMapValid(string)

public static bool IsMapValid(string mapName)

Parameters

mapName string

Returns

bool

NextFrame(Action)

Queue a task to be executed on the next game frame. Does not execute if the server is hibernating.

public static void NextFrame(Action task)

Parameters

task Action

NextWorldUpdate(Action)

Queue a task to be executed on the next pre world update. Executes if the server is hibernating.

public static void NextWorldUpdate(Action task)

Parameters

task Action

PrecacheModel(string)

public static void PrecacheModel(string name)

Parameters

name string

PrintToChatAll(string)

public static void PrintToChatAll(string message)

Parameters

message string

PrintToConsole(string)

public static void PrintToConsole(string s)

Parameters

s string