Page MenuHomeFeedback Tracker

Functions for sending chat messages to players do not work
Closed, ResolvedPublic


There are several functions defined that appear to be for sending chat messages to players:

  • CGame class in 3_Game\Global\Game.c has:
    • proto native void Chat(string text, string colorClass);
    • proto native void ChatMP(Man recipient, string text, string colorClass);
    • proto native void ChatPlayer(string text);
  • PlayerBase class in 4_World\Entities\ManBase\PlayerBase.c has:
    • void Message( string text, string style )
    • void MessageStatus( string text )
    • void MessageAction( string text )
    • void MessageFriendly( string text )
    • void MessageImportant( string text )

None of these functions appear to successfully send chat messages from the server to a player.

I would like to be able to have my server-only mod send chat messages to players to notify them of important events. I do not want to use a client-side mod. I prefer chat messages because this allows individuals who don't want to see the messages to disable them in their DayZ game settings.

Is this a known issue? Is a fix planned?


Operating System
Windows 10 x64
Steps To Reproduce
  1. Make a copy of the mpmissions\dayzOffline.chernarusPlus directory, called mpmissions\testing.chernarusPlus
  2. Open mpmissions\testing.chernarusPlus\init.c for editing
  3. Update the server configuration to use the new testing.chernarusPlus mission
  4. Add the following to the CustomMission class in mpmissions\testing.chernarusPlus\init.c file:
// ...

class CustomMission: MissionServer
    void CustomMission()
                this.Broadcast, 10000, true);

    void Broadcast()
        Print("Broadcast Begin");

        GetGame().Chat("Testing Chat", "colorAction");
        GetGame().ChatPlayer("Testing ChatPlayer");

        array<Man> players = new array<Man>();
        foreach (Man player : players)
            PlayerBase pb = PlayerBase.Cast(player);
            Print("Trying to send message to " + pb);

            GetGame().ChatMP(pb, "Testing ChatMP for " + pb, "colorAction");

            pb.MessageStatus("Testing MessageStatus for " + pb);
            pb.MessageAction("Testing MessageAction for " + pb);
            pb.MessageFriendly("Testing MessageFriendly for " + pb);
            pb.MessageImportant("Testing MessageImportant for " + pb);

        Print("Broadcast Done");

// ...

Now run the server and connect to the server with DayZ client.

Notice how the player does not receive any chat messages from the server, even though "Game Messages", "Admin Messages", and "Player Messages" are all "Enabled".

Notice how the server's script log includes the Print-ed messages indicating that the Broadcast function is correctly being called.

Additional Information

Version 1.07.153006

Game Settings:

Server Script Log:

I see that a similar bug, T144467, was opened a few months ago, but I presume it hasn't received any attention because the creator of the issue did not provide any useful information.

Event Timeline

tjensen created this task.Apr 26 2020, 4:51 PM
Geez changed the task status from New to Assigned.Apr 27 2020, 2:21 PM
Geez changed the task status from Assigned to Confirmed Internally.Aug 12 2022, 1:50 PM
Geez closed this task as Resolved.Aug 23 2022, 11:50 PM
Geez claimed this task.