anthall 10 Posted November 25, 2014 Hi. I am looking to create something similiar to Battle Royale regarding server behavior: I want to be able to lock the server at certain point and after that kick players of the server when they die. Locking the server is more important. Now, I know it is possible because it's done in BR, but I just can't seem to find how. When I googled up the serverCommand command (https://community.bistudio.com/wiki/serverCommand) I thought I got it. Turns out that this can only be called from UI event handlers, so not really what I am looking for. So, is that possible with mission scripting at all? Or does it require actual modding? Or maybe some kind of server management from command line? Tinkering with Battleye? Whatever it is, I would really appreciate if someone could point me to the right direction? Thanks:) Share this post Link to post Share on other sites
killzone_kid 1333 Posted November 25, 2014 Second example here: https://community.bistudio.com/wiki/serverCommandExecutable should give you some ideas Share this post Link to post Share on other sites
anthall 10 Posted November 25, 2014 No, I think you are wrong. A quote from serverCommand documentation: "NOTE: This command must be executed from UI event handler (ctrlAddEventHandler, displayAddEventHandler), such as onButtonDown or other User_Interface_Event_Handlers." And I don't want to do anything in ui event handlers. I want to do something onPlayerKilled.sqf. Never the less, I did test the server command again, but no luck. So, the question still stands... Share this post Link to post Share on other sites
jshock 513 Posted November 25, 2014 No, I think you are wrong. A quote from serverCommand documentation: "NOTE: This command must be executed from UI event handler (ctrlAddEventHandler, displayAddEventHandler), such as onButtonDown or other User_Interface_Event_Handlers."And I don't want to do anything in ui event handlers. I want to do something onPlayerKilled.sqf. Never the less, I did test the server command again, but no luck. So, the question still stands... He used the command serverCommandExectutable, which has a bit different explanation, but he was more referencing the example used in that commmand's wiki page, and no matter how you look at it your going to have to do a UI because the serverCommand command can only be executed by a UI EH. Unless someone has another miraculous workaround :p. Share this post Link to post Share on other sites
anthall 10 Posted November 25, 2014 ServerCommandExecutable is just a check if that serverCommand is available. The example uses serverCommand to do the actual command. So, let me get this topic back on track: Battle Royale has this functionality (a miraculous workaround). I am looking for information on how it might have been done. This would have to be done from a script on a server side or a mod on the server. There won't be any admins present to interact with that UI and other than admins should not have an access to kicking players or locking the server. Can't do UI. Share this post Link to post Share on other sites
killzone_kid 1333 Posted November 25, 2014 If it is server only you want, then forget about serverCommand, it doesn't work on server. What you need is a .dll that can talk to BattlEye and callExtension. Share this post Link to post Share on other sites
anthall 10 Posted November 26, 2014 Brilliant! If you have any links for more information, I sure would appreciate it:) Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted November 26, 2014 I guess, KK is refering to this: ArmA Scripting Tutorials: How To Make ArmA Extension (Part 1) ArmA Scripting Tutorials: How To Make ArmA Extension (Part 2) Share this post Link to post Share on other sites
anthall 10 Posted November 26, 2014 Ok, getting a DLL together seems pretty straightforward. I am also already using the node extension for arma: http://forums.bistudio.com/showthread.php?178327-Node-js-Extension-for-Arma-3-(sock-sqf-sock-dll-sock-rpc) Now, the question is, how would that extension, or maybe node application interact with battleye? Does battleye have somekind of api? Share this post Link to post Share on other sites
Tajin 349 Posted November 26, 2014 http://www.battleye.com/downloads/BERConProtocol.txt Share this post Link to post Share on other sites
anthall 10 Posted November 26, 2014 Excellent, thank you very much!:) Share this post Link to post Share on other sites
mash6 15 Posted November 28, 2014 (edited) Just in case you don't wan't to create an extension, you can just do a BEFilter that kicks player broadcasting a specific publicVariable. Put this in publicvariable.txt in your server's battleye folder : 5 "playerKick" Then in your killed eventhandler do something like this : playerKick = true; publicVariableServer "playerKick"; Just a workaround, but I think Battle Royal use this. But keep in mind that when you allow kicking using script, you allow hackers to kick clients by remotely executing the "kick code" Player will get kicked and see a public variable restriction message. Nice day ! Edited November 28, 2014 by Mash6 Share this post Link to post Share on other sites
anthall 10 Posted November 29, 2014 Ok guys, I got what I wanted to work. I was already using this node extension to do other stuff, so I started to play around on the node app, trying to send a correctly formatted UDP packet to BE server. For about 4 hours I tried to get the crc32 checksum correct, but then I noticed this: Battle-node BE client. With this I was able to connect to the BE server without any problems and got the server locked and was able to kick players. Also, this way it will be easier to protect against hackers, because I can vet some events in the server, and only allow connections to the node from localhost. So, if someone else finds this topic and is wondering how to kick, ban, lock the server or anyhow manage the server, this is a one way to do it. Share this post Link to post Share on other sites