Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

Write text to primary frequency from a EuroScope PlugIn


Arnoud van Leeuwen 1280950
 Share

Recommended Posts

Arnoud van Leeuwen 1280950
Posted
Posted

Hi all,

 

I am writing a Plugin for ES from which I need to send pilots a text message if they are flagged as text-only.

I am using DisplayUserMessage() to do this.

However somehow if I p[Mod - Happy Thoughts] the controller frequency as the handler name I get what seems to be a duplicate version of the frequency chat.

 

if (!ControllerMyself().IsValid())
           return;

       CGrountToAirChannel channel = GroundToArChannelSelectFirst();
       while (!channel.GetIsPrimary())
           channel = GroundToArChannelSelectNext(channel);

       std::stringstream ss;
       ss << std::fixed << std::setprecision(3) << channel.GetFrequency();
       DisplayUserMessage(ss.str().c_str(),
                          "",
                          str.c_str(),
                          true, false, false, false, false);

This yields the following result:

bwshNhC.png

But what I want to see is this:

JTRgSnE.png

Note the two seemingly identical voice handlers. Problem is the lower channel is the actual voice channel, and the upper one is a private chat of sorts to callsign 118.400, which does not exist.

 

I am starting to suspect that DisplayUserMessage() is not the way to go here.

Can anyone help me out on how to achieve on-frequncy message posting by a plugin?

 

Regards,

Arnoud

Link to comment
Share on other sites

 Share