MANUAL for GMnet ENGINE and GMnet CORE

mp_chatSend(message,[to])

Description

Object has to be set up with mp_syncAsChatHandler first, otherwise an error will occur.

Send message via the CHAT Interface over this chanel. The message has to be a string. You can also experiment with json to send more complicated data.

This message will by default be sent to all clients and the server [also the local game!] and can be retrieved via mp_chatGetQueue.

Use the additional 'to' argument to only send this message to one player.

Example

Read the tutorial about creating a chat system for more information.

Arguments

Name type description
message string The message to send
[to] string (optional; Will send to all by default) hash of the player that the message should be sent to.

Returns

Nothing


Back to index.


Creative Commons License

All pages in this manual are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Manuals / GMnet ENGINE Manual

GameMaker: Studio is owned by YoYoGames. GMnet is not affiliated with YoYoGames.
The GMnet logos use icons from Entypo (http://entypo.com/) and Open Iconic (https://useiconic.com/open/). They are licensed under CC BY-SA 4.0.