Jump to content
HeadRox

Player joins server - announcement

Recommended Posts

Does anyone know if this is possible to let the server say "player X joins the server", and "player X leaves the server", with the current tools we have?
Years ago i had that on my DayZ Mod server. Cant remember how or what did it.

Share this post


Link to post
Share on other sites
1 hour ago, philippj said:

Easiest done via RCON tools.

You mean like Dart or EPM? and how do does those announce automatically?

Share this post


Link to post
Share on other sites
1 minute ago, ICEMAN-FMCS said:

Seems interesting care to elaborate?..

 

DarT and RPM are basically RCON interfaces that provide a graphical interface for RCON stuff. There are other tools like CFTools (https://omegax.cftools.de) or battleWarden (https://battlewarden.net/) that are RCON based but provide more and custom features. 

Share this post


Link to post
Share on other sites
8 minutes ago, philippj said:

 

DarT and RPM are basically RCON interfaces that provide a graphical interface for RCON stuff. There are other tools like CFTools (https://omegax.cftools.de) or battleWarden (https://battlewarden.net/) that are RCON based but provide more and custom features. 

Im using Bec atm is there commands to do this using Bec?

Edited by ICEMAN-FMCS

Share this post


Link to post
Share on other sites

DaRT has the capability to do this, but not out of the box. Here's the source. https://github.com/DomiStyle/DaRT And are you sure you want to do this right now though? It's just going to say, "Survivor" has joined a bunch of times. 

Share this post


Link to post
Share on other sites
21 minutes ago, robbyj said:

DaRT has the capability to do this, but not out of the box. Here's the source. https://github.com/DomiStyle/DaRT And are you sure you want to do this right now though? It's just going to say, "Survivor" has joined a bunch of times. 

Id be happy with just the amount of players on the server every 5 or so mins, I dont really need it to show the names of players, just the amount will do me fine. Will this tool still do this?

Share this post


Link to post
Share on other sites
5 hours ago, ICEMAN-FMCS said:

Id be happy with just the amount of players on the server every 5 or so mins, I dont really need it to show the names of players, just the amount will do me fine. Will this tool still do this?

DaRT won't but RCON will and I personally know a way to make it work for BEC. I'm at work right now but when I get out I'll type something up

Share this post


Link to post
Share on other sites

use .Count() on the getplayerlist function, tho it seems to retrieve only alive players need further testing

Edited by Sentepu
  • Like 1

Share this post


Link to post
Share on other sites
On 27-9-2018 at 4:12 PM, robbyj said:

DaRT won't but RCON will and I personally know a way to make it work for BEC. I'm at work right now but when I get out I'll type something up

Please share your knowledge with us if you want. I'm interested!

Share this post


Link to post
Share on other sites
On 9/28/2018 at 2:14 PM, headrox said:

Please share your knowledge with us if you want. I'm interested!

I'm writing a BEC plugin as we speak that will work for everyone's server no matter what version of windows you are using to host your server and will use BEC's scheduler instead of the window's scheduler. Expect a link to github within the next 24 hours to download!

  • Thanks 1

Share this post


Link to post
Share on other sites

I have modified the code from: https://github.com/DomiStyle/DaRT and added a new option to DaRT to announce player connected/disconnected via /say -1.
 

You will find a new tab called "Announcers" in Settings. There is currently a single checkbox with the option to announce player login/logout. I can separate these to their own checkboxes if it is needed. I prefer to have both as a single option to toggle.

DaRT with Login Feed Announcer

I make no claim to the creation of DaRT. All credit goes to the respective developers and contributors of it where due.

logfeed.PNG

settings.PNG

Edited by Aussie Cleetus
added screenshots of DaRT with the added feature
  • Like 1

Share this post


Link to post
Share on other sites
// add in RCon.cs under 
//if (Settings.Default.refreshOnJoin && message.EndsWith("disconnected") && !_form.pendingPlayers)"
//{
//    Thread thread = new Thread(new ThreadStart(_form.thread_Player));
//    thread.IsBackground = true;
//    thread.Start();
//} <- Line 696
if (Settings.Default.announcePlayers)
{
    string PlayerConnectOrDisconnectMessage = String.Join(" ", message.Split(' ').Skip(2));
    if (PlayerConnectOrDisconnectMessage.EndsWith(" disconnected"))
    {
        _client.SendCommand(BattlEyeCommand.Say, "-1 " + PlayerConnectOrDisconnectMessage);
    }
    else if (PlayerConnectOrDisconnectMessage.EndsWith(" connected"))
    {
        string PlayerConnectedString;
        PlayerConnectedString = System.Text.RegularExpressions.Regex.Replace(PlayerConnectOrDisconnectMessage, @"\(.*\)", "");

        // Remove extra spaces.
        PlayerConnectedString = System.Text.RegularExpressions.Regex.Replace(PlayerConnectedString, @"\s+", " ");

        _client.SendCommand(BattlEyeCommand.Say, "-1 " + PlayerConnectedString);
    }
}
// insert into GUIsettings.cs
//
//add under line: tooltip.SetToolTip(connectOnStartup.... 
tooltip.SetToolTip(announcePlayers, "If checked, DaRT will send an announcement in global chat for login and logout of each player.");

//add under line: connectOnStartup.Checked = ....
announcePlayers.Checked = Settings.Default.announcePlayers;

//add under line: Settings.Default.connectOnStartup = ....
Settings.Default.announcePlayers = announcePlayers.Checked;
// THIS IS NOT SUPPOSED TO BE DONE, BUT IT WOULDN'T WORK UNLESS I manually added this to Settings.Designer.cs

//added under lines:
//[global::System.Configuration.UserScopedSettingAttribute()]
//[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
//[global::System.Configuration.DefaultSettingValueAttribute("True")]
//public bool showUnknownChat {
//    get {
//        return ((bool)(this["showUnknownChat"]));
//    }
//    set {
//        this["showUnknownChat"] = value;
//    }
//}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool announcePlayers {
    get {
        return ((bool)(this["announcePlayers"]));
    }
    set {
        this["announcePlayers"] = value;
    }
}

This is what I've modified. Only other thing is the [Design] for GUIsettings.cs to add the new tab and the checkbox named "announcePlayers".

Added this just in case anyone was wondering exactly what I did.

Edited by Aussie Cleetus

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×