Jump to content
  • 0

How to kick player ?


lmapper

Question

12 answers to this question

Recommended Posts

  • 0

How to kick player from server with script ?

 

It is by far easier to do so via RCON tools, like Dart or others. 

 

These require that you put in the server IP and port number, plus state the RCON password set by the server host.  

Once running, you can generally warn, kick and ban people from your server. 

You can find a post (plus download info) on Dart here.

 

There are other RCON tools - you can always look for others that might suit you better. 

Link to comment
Share on other sites

  • 0

It is by far easier to do so via RCON tools, like Dart or others. 

 

These require that you put in the server IP and port number, plus state the RCON password set by the server host.  

Once running, you can generally warn, kick and ban people from your server. 

You can find a post (plus download info) on Dart here.

 

There are other RCON tools - you can always look for others that might suit you better. 

 

You misunderstood me.

I do not want to kick the player manually, so I know how to do it.

I want to understand how to kick a player through the code (script).

 

For examples:

KickClient(target, "%s", reason); // From SourcePawn for CS:S
Kick(playerid); // From Pawn for SA:MP
Link to comment
Share on other sites

  • 0

 

You misunderstood me.

I do not want to kick the player manually, so I know how to do it.

I want to understand how to kick a player through the code (script).

 

For examples:

KickClient(target, "%s", reason); // From SourcePawn for CS:S
Kick(playerid); // From Pawn for SA:MP

 

i dont think thats possible, except fvia bec ... but you can close all displays or crash the target players game, forcing him to alt + F4.

Link to comment
Share on other sites

  • 0

there's a kick and ban command built into the game engine.

 

However, I prefer the method with a bit more logging and its pretty easy.

 

just use public variables.  Example

 

[code]

// door unlock

_pos = position Player;

_name = name Player;

_doorCombo = 1234;

 

if (_unlockFailed) then {

 PV_BadKeyEntered = [_name,_doorCombo,_pos];

 publicVariable "PV_BadKeyEntered";

};

[/code]

 

Just make sure you put an entry in the publicVariables.txt for the pv so it kicks them.  It will log the time it happened, the name of the player, the door combo, and the pos.  You relly don't need to record the player name since the player will be passed to BattlEye anyways but this is just for an example.

Link to comment
Share on other sites

  • 0

That's actually pretty cool idea to force BE kick on client using filters. Thanks.

np man.  The best part of this method is you can log any data you want.  Just throw the data in the value of the PV when you declare it.

 

I've been doing mad work with PV's and if you haven't looked into them, you can do amazing things!

 

One example is my event system (to be released) where if I start an event, players get the option to tp but only if an event is running.  I use PV's to check to see if the server has an event running on client login so that they can get the current status even if they logged in after the event started.

Link to comment
Share on other sites

  • 0

hambeast,

Can you share this build-in kick method?

Just use BEC to do it. Its a lot better then trying to add the feature in.

This was how it use to be done:

serverCommand format ["#exec kick %1", name player];

But due to update 1.5 Arma 2 stopped working with serverCommand.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...