SendEventToClient

A new and improved version of Send Message to Client !

An Event is nothing but an eventName combined with a messageStruct. This opens more possibilities than just a simple SendMessageToClient()

Description

This function sends a single Event to a particular client in your server. This is very useful in some games where you only want to send one signal at a time.

The Receiver’s client id should be the integer client id of the client you want to send a message to.

Syntax

SendEventToClient(recieverClientId,eventName, yourMessageStruct)
ArgumentDescription

recieverClientId

The clientId of the recipient of your message. This must be a Number.

eventName

The name of this event. Must be a String

messageStruct

The message you want to send. Add key-value pairs of the information you want this to carry. Must be a Struct

Returns

N/A

Where will the receiver get this message?

After a successful event send on your server, the callback function callback_ReceivedEvent() is called on the receiver's end.

Last updated