Table of Contents

Interface ICore.IManagedInterface

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

Represents the managed interface implemented by its unmanaged counterpart.

public interface ICore.IManagedInterface : IUnmanagedInterface
Inherited Members

Methods

ConnectBot(string, string)

Attempt to connect a new bot to the server.

void ConnectBot(string name, string script)

Parameters

name string

The bot name (player name).

script string

The bot script to execute.

GetConfig()

Gets the server configuration.

IConfig GetConfig()

Returns

IConfig

Yhe server configuration.

GetEventDispatcher()

Gets the core event dispatcher.

IEventDispatcher<ICoreEventHandler> GetEventDispatcher()

Returns

IEventDispatcher<ICoreEventHandler>

The core event dispatcher.

GetGravity()

Gets the server gravity.

float GetGravity()

Returns

float

The server gravity.

GetNetworkBitStreamVersion()

Get the version of the NetworkBitStream class the core was built with.

int GetNetworkBitStreamVersion()

Returns

int

The version of the NetworkBitStream class.

GetNetworks()

Gets a list of available networks.

FlatPtrHashSet<INetwork> GetNetworks()

Returns

FlatPtrHashSet<INetwork>

A list of available networks.

GetPlayers()

Gets the player pool

IPlayerPool GetPlayers()

Returns

IPlayerPool

The player pool.

GetTickCount()

Gets the tick count.

uint GetTickCount()

Returns

uint

The tick count.

GetVersion()

Gets the version of the open.mp server.

SemanticVersion GetVersion()

Returns

SemanticVersion

The version of the open.mp server package.

GetVersionHash()

Gets the version hash of the open.mp server.

string GetVersionHash()

Returns

string

The version hash.

GetWeaponName(PlayerWeapon)

Get the name of a weapon.

string GetWeaponName(PlayerWeapon weapon)

Parameters

weapon PlayerWeapon

The weapon.

Returns

string

The name of the weapon.

ReloadAll()

Create all entities that appear on GM start.

void ReloadAll()

ResetAll()

Clear all entities that vanish on GM exit.

void ResetAll()

SetData(SettableCoreDataType, string)

Sets string data during runtime.

void SetData(SettableCoreDataType type, string data)

Parameters

type SettableCoreDataType

The type of the data.

data string

The data value.

SetGravity(float)

Sets the server gravity.

void SetGravity(float gravity)

Parameters

gravity float

The server gravity.

SetThreadSleep(Microseconds)

Sets the sleep value for each main thread update cycle.

void SetThreadSleep(Microseconds value)

Parameters

value Microseconds

The sleep duration.

SetWeather(int)

Sets the server weather.

void SetWeather(int weather)

Parameters

weather int

The server weather.

SetWorldTime(TimeSpan)

Sets the server world time.

void SetWorldTime(TimeSpan time)

Parameters

time TimeSpan

The world time, truncated to whole hours on the native side.

TickRate()

Gets the ticks per second.

uint TickRate()

Returns

uint

Ticks per second.

UseDynTicks(bool)

Toggle dynamic ticks instead of static duration sleep.

void UseDynTicks(bool enable)

Parameters

enable bool

true if dynamic ticks should be enabled.

UseStuntBonuses(bool)

Toggles server stunt bonuses.

void UseStuntBonuses(bool enable)

Parameters

enable bool

true if stunt bonuses should be enabled.