Skip to content

IClientEvents

Interface · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll

public interface IClientEvents

Events as a client resource sends and receives them. Own names may be name or resource-id:name; an event carries at most 16 arguments. Sending is queued and happens on the next frame.

Extension methods: TypedNetworkEvents.On, TypedNetworkEvents.EmitToServer, TypedNetworkEvents.EmitToAll

void EmitTo(EntityId target, string name, params NetworkValue[] arguments);

To the client that owns target (a player or vehicle), and to the server resources’ handlers.

Parameters

void EmitToAll(string name, params NetworkValue[] arguments);

To every other client, and to the server resources’ handlers.

Parameters

void EmitToServer(string name, params NetworkValue[] arguments);

To the authority only: the server resources’ handlers, nobody else.

Parameters

IDisposable On(string name, Action<NetworkEvent> handler);

Events named name arriving from the authority or relayed from other clients.

Parameters

Returns IDisposable