SolvedMaking a kick script loop on player rejoin

Posts 1–7 of 7 · Page 1 of 1
Making a kick script loop on player rejoin
i have a kick script thats special and i would like it to loop so if the player comes back he gets kicked again when he joins the server that way i dont have to keep opening the menu and finding him then executing it on him again and btw i do have a RE so please help

could someone put a example below with a lock script that kicks when player rejoins or something if so that would be great also make sure to PM me how to do it if you don't want it to be seen by others who could use it in the wrong way huehuehe
Try this. Replace (code) with the script.
Code:
while true do

end
Idk if end is needed. But u gotta use while true do. U need something to say that it needs to loop to a certain place so that would be end probably. I'm not a scripter but from what I know is this the code for a loop.
sorry not the kind of loop i want but i see where you're coming from. i'm looking for this lock script to keep running on all players i locked for as long as i'm ingame so each time they close arma and rejoin they are locked with a grey screen so if someone could put a example or something that would be great also i could try your loop but im almost 100% positive it wont run on the player when he comes back on the server after he gets locked/kicked

sorry cyber thanks for trying to help and btw this is dayz mod not standalone if you guys get confused i never said which game it was above hehe my bad
Quote Originally Posted by xxdayzxx View Post
sorry not the kind of loop i want but i see where you're coming from. i'm looking for this lock script to keep running on all players i locked for as long as i'm ingame so each time they close arma and rejoin they are locked with a grey screen so if someone could put a example or something that would be great also i could try your loop but im almost 100% positive it wont run on the player when he comes back on the server after he gets locked/kicked

sorry cyber thanks for trying to help and btw this is dayz mod not standalone if you guys get confused i never said which game it was above hehe my bad
Np. SA and Mod both have the same kinda loops. Try storing the player's name in a Variable and then let it run a loop =p
ya i know they have the same loops i just said this is dayz mod because your mostly around standalone and others get confused anyways no i already have what your talking about to add a name to the script then run and it locks him when i run it again huheu its much more easy if i just have it so i click on a player and lock him then when he comes back on the server it runs on him again kinda like rustlers blacklist player script but this one is different because it runs it for me for as long as i'm ingame it keeps running the script on each player i ever locked while i was on.

you may ask why not edit the code in rustlers script and replace that? well i cant because that method of keeping the player out is old and his method is perm for till server restarts hehe i just want this one to do it only for aslong as i'm ingame
For that you will want your kick code to be set on Join In Progress (JIP) players too:
https://community.bistudio.com/wiki/...in_in_Progress

If you broadcast it with publicVariable it will be synchronized with all current players and any players that join in the future.

You have to be careful using publicVariable though, because most servers publicvariable.txt battleye filters are set to kick for all publicVariable broadcasts except specific exceptions. One of the exceptions for servers running infistar antihack right now is "PVAHR_0_".

That means you can do something like this and not get kicked:
Code:
private ["_name"];

_name = _this select 0;

if (isNil "PVAHR_0_banplayer") then {
	PVAHR_0_banplayer = format["
	if (name player == '%1') then {
		failMission 'LOSER';
		0 fadeSound 0;
		for '_i' from 0 to 100 do {(findDisplay _i) closeDisplay 0;};
	};", _name];
};

publicVariable "PVAHR_0_banplayer";
Or you could overwrite an existing publicVariable on the server that is not updated frequently with your kick code. That will be synchronized every time the player rejoins.

Note setVehicleInit and processInitCommands are also JIP compatible, but they are blocked by antihack, so don't even bother trying to use them.

You could also just loop your kick code with your remote exc. But that would be extremely inefficient, especially if the player never rejoins. If you wanted to do it anyway it would be something like this:

Code:
private ["_kick","_name"];

_name = _this select 0;

_kick = format["
if (name player == '%1') then {
	failMission 'LOSER';
	0 fadeSound 0;
	for '_i' from 0 to 100 do {(findDisplay _i) closeDisplay 0;};
};
", _name];

while {1 == 1} do {
	[_kick] execVM "YourScriptz\YourRE.sqf";
	sleep 60;
};
I set it to loop every 60 seconds because that is about how long it takes a player to rejoin. Any faster than that and you would probably lag out the server.

Note the kick code I posted is based on name. If they change their name it will not work, so you should base it on playerID instead. Also don't use the variable names I used (since this is posted in a public forum).
No reply from OP, assuming solved.

/Closed.
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us