chat_class:send_systemmsg_example
Table of Contents
sendSystemMsg
How to use
Chat:sendSystemMsg(content, targetuin)
Where:
- content string (The message that will be sent)
- targetuin number (The Uid of the player that will see the message)
And returns:
- ErrorCode.Ok number (0 if execution was succesful and 1001 if the execution failed)
Use example
When a player joins, he will see a message.
ScriptSupportEvent:registerEvent([=[Game.AnyPlayer.EnterGame]=], function(e) local playerid = e['eventobjid'] local _, playernick = Player:getNickname(playerid) Chat:sendSystemMsg("Welcome, " .. playernick, playerid) end)
chat_class/send_systemmsg_example.txt · Last modified: 2024/06/30 20:32 by notsopro