robbyj 77 Posted September 30, 2018 ThePyrotechnic and I developed a BEC plugin for DayZStandalone servers that will display the number of players on your server. I have this plugin running on my server r/dayzPub if you'd like to see it in action before installing. Tutorial: https://www.twitch.tv/videos/316793437 Github: https://github.com/robbyjm/RobbysPlayerPlugin 1 1 Share this post Link to post Share on other sites
ICEMAN-FMCS 69 Posted September 30, 2018 57 minutes ago, robbyj said: ThePyrotechnic and I developed a BEC plugin for DayZStandalone servers that will display the number of players on your server. I have this plugin running on my server r/dayzPub if you'd like to see it in action before installing. Tutorial: https://www.twitch.tv/videos/316793437 Github: https://github.com/robbyjm/RobbysPlayerPlugin Checking it out now, thanks. Share this post Link to post Share on other sites
ICEMAN-FMCS 69 Posted September 30, 2018 Works great thanks, I notice it includes the Rcon login as a player is there away around that so It says 0 player when there are no players in the server?, Good work btw. Share this post Link to post Share on other sites
robbyj 77 Posted October 1, 2018 5 hours ago, ICEMAN-FMCS said: Works great thanks, I notice it includes the Rcon login as a player is there away around that so It says 0 player when there are no players in the server?, Good work btw. Are you using any other RCon tool besides BEC? Share this post Link to post Share on other sites
SilvioDoHOTS 1 Posted October 1, 2018 @robbyj it is possible to create a plugin that shows a massage everytime a player dies? If yes, can you help me with a plugin? Share this post Link to post Share on other sites
ICEMAN-FMCS 69 Posted October 1, 2018 5 hours ago, robbyj said: Are you using any other RCon tool besides BEC? Yea im using DaRT all good. 4 hours ago, SilvioDoHOTS said: @robbyj it is possible to create a plugin that shows a massage everytime a player dies? If yes, can you help me with a plugin? This seems good.... Share this post Link to post Share on other sites
philippj 103 Posted October 1, 2018 8 hours ago, SilvioDoHOTS said: @robbyj it is possible to create a plugin that shows a massage everytime a player dies? If yes, can you help me with a plugin? Not possible with BEC Share this post Link to post Share on other sites
G0ndalf 9 Posted October 1, 2018 Hey, i am sorry but it does not work for me, i dont know why, i created a new Folder called it "Plugins" moved your "RobbysPlayerPlugin" Folder in (with the __init__.py inside) but it does not load anything, just connecting to the Server. Do i miss something in my Config ? Greetz Gondalf Share this post Link to post Share on other sites
CaptHero 1 Posted October 1, 2018 34 minutes ago, G0ndalf said: Hey, i am sorry but it does not work for me, i dont know why, i created a new Folder called it "Plugins" moved your "RobbysPlayerPlugin" Folder in (with the __init__.py inside) but it does not load anything, just connecting to the Server. Do i miss something in my Config ? Greetz Gondalf hii guys, i have same problem like @G0ndalf , i checked everything but my bec doesnt load the plugin. Share this post Link to post Share on other sites
Diesel_42o 3 Posted October 2, 2018 On 9/30/2018 at 3:04 PM, robbyj said: ThePyrotechnic and I developed a BEC plugin for DayZStandalone servers that will display the number of players on your server. I have this plugin running on my server r/dayzPub if you'd like to see it in action before installing. Tutorial: https://www.twitch.tv/videos/316793437 Github: https://github.com/robbyjm/RobbysPlayerPlugin Works great! Thanks! Share this post Link to post Share on other sites
therealunhinged 2 Posted October 2, 2018 Is this version dependant? I'm using BEC version 1.496 and don't seem to be able to get it to work! My problem is that I can't get the latest version of BEC to work on my server, only 1.496 works. Share this post Link to post Share on other sites
freak69 0 Posted October 2, 2018 ''' File name: __init__.py Author: /u/robbychampagne, ThePyrotechnic Date created: 9/29/2018 Date last modified: 9/29/2018 ''' from twisted.internet import task class RobbysPlayerPlugin: ''' Player plugin for DayZ servers''' def __init__(self, instance): self.bec = instance # Create a Task that calls the function Send_PlayerCount each 15 min. self.PlayerCount_Task = task.LoopingCall(self.Send_PlayerCount) self.PlayerCount_Task.start(900, False) def get_players(self): return self.bec.Bec_playersconnected def Send_PlayerCount(self): '''Send a message to all players in game.''' players = self.get_players() if len(players) > 0: rcon_msg = 'Say -1 There are %i players online' % len(players) else: rcon_msg = 'Say -1 There no player online' self.bec._Bec_queuelist.append(rcon_msg) def start(x): RobbysPlayerPlugin(x) Would this not make more sense as in if there is players show the player count and if there is no player say that there is no player or 0 players online? maybe even def Send_PlayerCount(self): '''Send a message to all players in game.''' players = self.get_players() rcon_msg = 'Say -1 There are %i players online' % len(players) self.bec._Bec_queuelist.append(rcon_msg) Share this post Link to post Share on other sites
philippj 103 Posted October 2, 2018 19 minutes ago, freak69 said: ''' File name: __init__.py Author: /u/robbychampagne, ThePyrotechnic Date created: 9/29/2018 Date last modified: 9/29/2018 ''' from twisted.internet import task class RobbysPlayerPlugin: ''' Player plugin for DayZ servers''' def __init__(self, instance): self.bec = instance # Create a Task that calls the function Send_PlayerCount each 15 min. self.PlayerCount_Task = task.LoopingCall(self.Send_PlayerCount) self.PlayerCount_Task.start(900, False) def get_players(self): return self.bec.Bec_playersconnected def Send_PlayerCount(self): '''Send a message to all players in game.''' players = self.get_players() if len(players) > 0: rcon_msg = 'Say -1 There are %i players online' % len(players) else: rcon_msg = 'Say -1 There no player online' self.bec._Bec_queuelist.append(rcon_msg) def start(x): RobbysPlayerPlugin(x) Would this not make more sense as in if there is players show the player count and if there is no player say that there is no player or 0 players online? maybe even def Send_PlayerCount(self): '''Send a message to all players in game.''' players = self.get_players() rcon_msg = 'Say -1 There are %i players online' % len(players) self.bec._Bec_queuelist.append(rcon_msg) The thing is functional, although there are some issue in naming variables/functions and some other stuff. @robbyj there is an open pull request Share this post Link to post Share on other sites
freak69 0 Posted October 2, 2018 never used python for anything ^_^ I don't even understand why people need this as battleye remote control tools like DaRT do this already Share this post Link to post Share on other sites
philippj 103 Posted October 2, 2018 1 hour ago, freak69 said: never used python for anything ^_^ I don't even understand why people need this as battleye remote control tools like DaRT do this already Python is a great language tbh and dart doesnt do this out of the box you have to get a modified version of it, so the standard admin uses bec & dart in conjunction 1 Share this post Link to post Share on other sites
Mizev 19 Posted October 4, 2018 It's complicated. There is a simpler method. Add the script to a file: ..\DayZServer\mpmissions\dayzOffline.chernarusplus\init.c override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 30000, true); // 30 seconds } void NumPLayersOnServer() { ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); int numPlayers = players.Count(); for ( int i = 0; i < players.Count(); ++i ) { Man player = players.Get(i); if( player ) { string messPlayers = "Players on the server: " + numPlayers.ToString(); Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } 2 1 Share this post Link to post Share on other sites
Aussie Cleetus 57 Posted October 4, 2018 On 03/10/2018 at 2:47 AM, freak69 said: ''' File name: __init__.py Author: /u/robbychampagne, ThePyrotechnic Date created: 9/29/2018 Date last modified: 9/29/2018 ''' from twisted.internet import task class RobbysPlayerPlugin: ''' Player plugin for DayZ servers''' def __init__(self, instance): self.bec = instance # Create a Task that calls the function Send_PlayerCount each 15 min. self.PlayerCount_Task = task.LoopingCall(self.Send_PlayerCount) self.PlayerCount_Task.start(900, False) def get_players(self): return self.bec.Bec_playersconnected def Send_PlayerCount(self): '''Send a message to all players in game.''' players = self.get_players() if len(players) > 0: rcon_msg = 'Say -1 There are %i players online' % len(players) else: rcon_msg = 'Say -1 There no player online' self.bec._Bec_queuelist.append(rcon_msg) def start(x): RobbysPlayerPlugin(x) Would this not make more sense as in if there is players show the player count and if there is no player say that there is no player or 0 players online? maybe even def Send_PlayerCount(self): '''Send a message to all players in game.''' players = self.get_players() rcon_msg = 'Say -1 There are %i players online' % len(players) self.bec._Bec_queuelist.append(rcon_msg) why does rcon need to be told when there are no players online? If it's a tool like dart, you'll see no players on the list... BEC even shows the number of players at the top by default. So if there are no players online, there is no real logical reason to output the text. That's what I gathered from going through the code of it. It just doesn't make sense to need to handle sending a "no players" message, because there are no players to receive the message. Share this post Link to post Share on other sites
ulli_123 2 Posted October 4, 2018 6 hours ago, Mizev said: It's complicated. There is a simpler method. Add the script to a file: ..\DayZServer\mpmissions\dayzOffline.chernarusplus\init.c override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 30000, true); // 30 seconds } void NumPLayersOnServer() { ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); int numPlayers = players.Count(); for ( int i = 0; i < players.Count(); ++i ) { Man player = players.Get(i); if( player ) { string messPlayers = "Players on the server: " + numPlayers.ToString(); Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } Nice idea, how can I display the display 1 or 2 lines higher, if you have a weapon in hand, the number of players is hidden Share this post Link to post Share on other sites
philippj 103 Posted October 4, 2018 3 minutes ago, ulli_123 said: Nice idea, how can I display the display 1 or 2 lines higher, if you have a weapon in hand, the number of players is hidden By sending X amount of messages afterwards containing only whitespaces Share this post Link to post Share on other sites
ulli_123 2 Posted October 4, 2018 Are you so nice and give me an example, have blank lines already synonymous rumprobiert, but did not work, it was only error messages when starting the server Share this post Link to post Share on other sites
philippj 103 Posted October 4, 2018 Param1<string> empty = new Param1<string>(" "); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, empty, true, player.GetIdentity()); Thats how you send a message to a single player. you have to place that in the loop 1 Share this post Link to post Share on other sites
Ton_41 1 Posted October 4, 2018 13 hours ago, Mizev said: It's complicated. There is a simpler method. Add the script to a file: ..\DayZServer\mpmissions\dayzOffline.chernarusplus\init.c override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 30000, true); // 30 seconds } void NumPLayersOnServer() { ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); int numPlayers = players.Count(); for ( int i = 0; i < players.Count(); ++i ) { Man player = players.Get(i); if( player ) { string messPlayers = "Players on the server: " + numPlayers.ToString(); Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } Nice and how to change loop for show this message to every 10 mins? 1 Share this post Link to post Share on other sites
ulli_123 2 Posted October 4, 2018 49 minutes ago, Ton_41 said: Nice and how to change loop for show this message to every 10 mins? GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 30000, true); // 30 seconds GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 600000, true); // 10 Min. 1 Share this post Link to post Share on other sites
kaspar rave 4 Posted October 5, 2018 (edited) thanks I set the time to 300000 so 5minutes I have put it on my Pastebin account. I have 8 kind of players with different loot. No rain https://pastebin.com/2FzDYwPb Edited October 5, 2018 by kaspar rave Share this post Link to post Share on other sites