Jump to content
Sign in to follow this  
anthall

Server admin functions from multiplayer server side script

Recommended Posts

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

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
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

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

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

Brilliant! If you have any links for more information, I sure would appreciate it:)

Share this post


Link to post
Share on other sites

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

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 by Mash6

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×