Jump to content
Sign in to follow this  
wyattwic

Ammo Boxes and Kicking locally

Recommended Posts

Hello everyone!

I have two questions,

First, I need to kick Player1 via a script witch is local to him. How should I go about doing that?

Second, Does ArmA3 ammo boxes work similar to ArmA2 ammo boxes? Can I use the following statement?

In ArmA2 this would allow an admin to get anything they wanted while other users have similar statements to fill it with their stuff.

_box = _this select 0;
clearWeaponCargo _box;
clearMagazineCargo _box;

if ((getPlayerUID player) in Admin_array) then {
//All items go here
};

Edited by Wyattwic

Share this post


Link to post
Share on other sites

Hello again everyone!

Ammoboxes act the same way (for my purposes) as ArmA 2 did. Awesome!

I still cant figure out how to kick someone locally, or any way for that matter. Here is what I attempted.

I attempted both on the client and server as well as locally hosting it and attempting with no luck.

serverCommand "#kick myid";

serverCommand "#exec kick myid";

serverCommandAvailable shows true on all but exec on an unauthenticated client locally.

Share this post


Link to post
Share on other sites

Would ending the mission disconnect him from the server?

I am attempting to build a automatic idle kick script. Got the idle detection down perfectly, its just kicking them.

---------- Post added at 13:11 ---------- Previous post was at 13:07 ----------

Shouldn't a dedicated box with running that command server side be considered a proper admin? How has this command changed since ArmA2?

---------- Post added at 14:51 ---------- Previous post was at 13:11 ----------

Im starting to get annoyed... No mater the locality, variation or authorization of this command, it wont execute.

servercommand "#kick PlayerName";

servercommand "#kick PlayerID";

servercommand "#exec kick PlayerName";

servercommand "#exec kick PlayerID";

I have also attempted without any # as well as # behind exec and kick.

They all have been ran at least twice from the dedicated server side and authenticated admin on a dedicated server.

It looks like this command just does not work anymore.

Share this post


Link to post
Share on other sites

I am still doing my research and so far my only viable option is crashing the client all together, but I would rather not do that.

I still need help if you guys have any ideas.

Share this post


Link to post
Share on other sites

Ok, maybe give this one a try (never tested that command myself):

fnc_forceDisconnect = { sendAUMessage [[netId _this], "ConnectTo: 127.0.0.1"]; };

In theory that should allow you to remotely tell a client to disconnect.

Execute it like this:

[ _target, "fnc_forceDisconnect", _target, false] spawn BIS_fnc_MP;

Let me know if that works, I'm curious about it. ;)

Share this post


Link to post
Share on other sites

Haven't heard of that function before. Ill try it shortly.

---------- Post added at 13:12 ---------- Previous post was at 11:21 ----------

No luck... I attempted running the following script on a dedicated and local multiplayer game.

//Force disconnect test script.  Run via execvm
//Wyatt 6/11/14
//This script is being ran locally on the client.

_target = _this select 0;

hint "script running";
sleep 60;
hint "about to send disconnect";
fnc_forceDisconnect = { sendAUMessage [[netId _this], "ConnectTo: 10.1.2.3"]; };  
hint "variable set";
[_target, "fnc_forceDisconnect", _target, false] spawn BIS_fnc_MP;  
hint "disconnect completed";

No errors were generated in the rpt and all the hints were successful. On another note I changed the IP to a random local IP thats outside of my subnet.

any other ideas?

Share this post


Link to post
Share on other sites

Hate to keep bumping but I am still stumped. Any help would be nice.

Edited by Wyattwic

Share this post


Link to post
Share on other sites

Hello everyone,

I am still searching for a solution as to how to kick or disconnect a player from a dedicated server via script. The script can be ran server side or client side, so I am open for anything that yields results.

Thank you

Share this post


Link to post
Share on other sites

The only way to actually "kick" someone using scripts on a dedicated server is to run serverCommand on the client of a logged in admin.

The obvious problem being that it requires an admin to be logged in at all times which isn't really a solution.

The next best thing you can do is kick them back to the lobby by "ending the mission" for a specific client.

Try this:

[ [ "Kick", false, 0, false, true ], "BIS_fnc_endMission", _target ] call BIS_fnc_MP;

Then add this to your description.ext:

class CfgDebriefing
{  
class Kick
{
	title = "You were kicked";
	subtitle = "Because I felt like it";
	description = "You were kicked";
};
};

Share this post


Link to post
Share on other sites

Ending the mission for a client is an option, but it does not free up the slot for other players to connect.

My main question is, on A2 we were able to kick players if executed on the server, why cant we do that now?

Thank you.

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  

×