Jump to content
Sign in to follow this  
whisper

Admin reserved slot

Recommended Posts

After a bit of server administration and running once into the issue, the lack of reserved slot for servers can really be hindering, if not worse when no admin can connect to a server having issues.

Reserved slot would be a good solution, but the changing nature of missions and number of slots available could lead to some problems.

I was thinking more to an always up "admin slot" for dedicated servers, requiring a special password set in configuration file, which would not give access to a player character slot, but only a camera spawned in the middle of the currently played map (or [0,0,0] if "middle of map" is too hard to code :) ), enabling a server admin to log in, chat with players and take appropriate actions if needed.

In an ideal world, one could even make a lil client application which would connect this way to a server, without having to launch the game itself, and give acces to the chat and inline commands

Share this post


Link to post
Share on other sites

hi,

My problem is the same as yours.

Have you found a way to add reserved slot to your server ?

thanks

Share this post


Link to post
Share on other sites

What you could do is, add a special slot and kick the player who connected into this slot when he doesn't log in with the server password after some time, let's say 20 seconds, with some onscreen warnings.

There are ways to detect if a player has logged in as admin and there are ways to kick a player from the server with scripting.

Xeno

Share this post


Link to post
Share on other sites
What you could do is, add a special slot and kick the player who connected into this slot when he doesn't log in with the server password after some time, let's say 20 seconds, with some onscreen warnings.

There are ways to detect if a player has logged in as admin and there are ways to kick a player from the server with scripting.

Xeno

So how do you do this? :)

Share this post


Link to post
Share on other sites

You can look at doomi mission as xeno put it in a long time ago, i dont have the skills to explain how its done, but at the start of the

i_client.sqf are the ability to reserve adminslot. Latest beta even have ability to reserve slots for clan-members related to their guid.

Share this post


Link to post
Share on other sites
// GVAR(reserved_slot) gives you the ability to add a reserved slot for admins

// if you don't log in when you've chosen the slot, you'll get kicked after ~20 once the intro ended

// default is no check, example: GVAR(reserved_slot) = "RESCUE";

GVAR(reserved_slot) = "";

Xeno already has provided a example, the names can be found by clicking on units in editor.

// GVAR(uid_reserved_slots) and GVAR(uids_for_reserved_slots) gives you the possibility to limit a slot

// you have to add the var names of the units to GVAR(uid_reserved_slots) and in GVAR(uids_for_reserved_slots) the UIDs of valid players

// GVAR(uid_reserved_slots) = ["alpha_1", "bravo_3"];

// GVAR(uids_for_reserved_slots) = ["1234567", "7654321"];

GVAR(uid_reserved_slots) = [];

GVAR(uids_for_reserved_slots) = [];

The above has a example done but the 1234567 will not work, put the guids of clan members in the quote marks. You can find out your guid in the bottom right in the profile screen. Note: You can not see other players so if you want to reserve for clan members then you will need to ask them theres.

Edited by Dirty Haz

Share this post


Link to post
Share on other sites

GVAR(reserved_slot) = "RESCUE";
GVAR(uid_reserved_slots) = ["alpha_1", "bravo_3"];
GVAR(uids_for_reserved_slots) = ["1234567", "7654321"];

So i put this/these in the Init.sqf?

Share this post


Link to post
Share on other sites

This seems quite useful. I've been around the block, and I've been on some of the more-full servers where a rule breaker was able to create a lot of havoc thanks to the server being full.

Share this post


Link to post
Share on other sites

Remote acess via BERCon/Battleye can always be used for kick, ban, you can even chat/warn players without being on the server :)

Share this post


Link to post
Share on other sites
Dorph;2132541']Remote acess via BERCon/Battleye can always be used for kick' date=' ban, you can even chat/warn players without being on the server :)[/quote']

Only if Battleye is running and somebody with access to it is available :p

There are many clans which don't give full access to every member.

Anyways, reserved slots should be part of the engine, then no scripted solutions or Battleye would be needed.

Xeno

Share this post


Link to post
Share on other sites

GVAR(reserved_slot) = "RESCUE";

GVAR(uid_reserved_slots) = ["alpha_1", "bravo_3"];

GVAR(uids_for_reserved_slots) = ["1234567", "7654321"];

So i put this/these in the Init.sqf?

Is this how you use it?

Share this post


Link to post
Share on other sites
GVAR(reserved_slot) = "RESCUE";

GVAR(uid_reserved_slots) = ["alpha_1", "bravo_3"];

GVAR(uids_for_reserved_slots) = ["1234567", "7654321"];

Is this how you use it?

Hey, nah not really. That was what got stated above but I have another way to prevent others to access the vehicles/planes instead, like I've done so my clan's Air Force crew can fly the combat fixed/rotary-wings, and only my army "ground" units can use the armors etc.

But it would be good to also get the reserved slots up because it is quite annoying that guests enters a slot even thought it says in the name/description for example:

"SP33D *RSERVED*"

So yup.

Share this post


Link to post
Share on other sites

So are there any scripts to reserve a slot for a GUID with a specific character etc otherwise a non verified player would get kicked

In the unit.sqf?

Share this post


Link to post
Share on other sites
You can just do as Xeno said, put in an admin slot.

Then have several warnings if people connect to it.

And that's done how? I want to create slots for clan members only that detects their GUID and it the GUID doesn't match the user gets kicked after a warning message is displayed.

Share this post


Link to post
Share on other sites

is there a command i can simply put into the players init box?

You can just do as Xeno said, put in an admin slot.

Then have several warnings if people connect to it.

where can i find the code for this in the domination mission?

Share this post


Link to post
Share on other sites

Cant get it working!!!

Im using

GVAR(reserved_slot) = "indep1";

and put it in the init.sqf file inthe main directory

the soldiers name is "indep1"

I get - error missing ;

---------- Post added at 06:41 PM ---------- Previous post was at 06:35 PM ----------

[/color]

Hey, nah not really. That was what got stated above but I have another way to prevent others to access the vehicles/planes instead, like I've done so my clan's Air Force crew can fly the combat fixed/rotary-wings, and only my army "ground" units can use the armors etc.

But it would be good to also get the reserved slots up because it is quite annoying that guests enters a slot even thought it says in the name/description for example:

"SP33D *RSERVED*"

So yup.

Can you elaborate on what script you used to create reserved slots for individual players? And to be clear does the script from xeno go in the init.sqf file?

Edited by TriGGa

Share this post


Link to post
Share on other sites
Dorph;2261298']At top of i_client.sqf

Found it but when i use it in my mission file it shows errors. Does this go in the init file?

Im using the following:

GVAR(reserved_slot) = "RESCUE";

GVAR(uid_reserved_slots) = ["alpha_1"' date= "bravo_3"];

GVAR(uids_for_reserved_slots) = ["1234567", "7654321"];

Share this post


Link to post
Share on other sites

If your using it in another mission ( not Domination), you must look for a script this calls...

x_client\reservedslot.sqf

// by Xeno
#define THIS_FILE "x_reservedslot.sqf"
#include "x_setup.sqf"

sleep 1;

if (serverCommandAvailable "#shutdown") exitWith {};

for "_i" from 1 to 3 do {
hint (localize "STR_DOM_MISSIONSTRING_335");
sleep 5;
};

if (serverCommandAvailable "#shutdown") exitWith {
hint format [(localize "STR_DOM_MISSIONSTRING_336"), GVAR(name_pl)];
};

hint (localize "STR_DOM_MISSIONSTRING_337");

sleep 5;

if (serverCommandAvailable "#shutdown") exitWith {
hint format [(localize "STR_DOM_MISSIONSTRING_336"), GVAR(name_pl)];
};

hint (localize "STR_DOM_MISSIONSTRING_338");
sleep 1;
[QGVAR(p_f_b_k), [player, GVAR(name_pl),2]] call FUNC(NetCallEventCTS);

Share this post


Link to post
Share on other sites

OK so I have the following code:

From i_client.sqf

// GVAR(reserved_slot) gives you the ability to add a reserved slot for admins
// if you don't log in when you've chosen the slot, you'll get kicked after ~20 once the intro ended
// default is no check, example: GVAR(reserved_slot) = "RESCUE";

GVAR(reserved_slot) = "admin";

// GVAR(uid_reserved_slots) and GVAR(uids_for_reserved_slots) gives you the possibility to limit a slot
// you have to add the var names of the units to GVAR(uid_reserved_slots) and in GVAR(uids_for_reserved_slots) the UIDs of valid players
// GVAR(uid_reserved_slots) = ["alpha_1", "bravo_3"];
// GVAR(uids_for_reserved_slots) = ["1234567", "7654321"];

GVAR(uid_reserved_slots) = [];
GVAR(uids_for_reserved_slots) = [];

and from x_reservedslot.sqf

// by Xeno
#define THIS_FILE "x_reservedslot.sqf"
#include "x_setup.sqf"

sleep 1;

if (serverCommandAvailable "#shutdown") exitWith {};

for "_i" from 1 to 3 do {
hint "Attention!\nThis is a reserved admin slot.\nIf you are an admin on this server log in in the next 20 seconds otherwise you'll get kicked automatically!";
sleep 5;
};

if (serverCommandAvailable "#shutdown") exitWith {
hint format ["Welcome %1!\nYou logged in, no kick", GVAR(name_pl)];
};

hint "Attention!\nYou have 5 seconds to log in or you get kicked automatically!";

sleep 5;

if (serverCommandAvailable "#shutdown") exitWith {
hint format ["Welcome %1!\nYou logged in, no kick", GVAR(name_pl)];
};

hint "You will be kicked now... !!!";
sleep 1;
[QGVAR(p_f_b_k), [player, GVAR(name_pl),2]] call FUNC(NetCallEvent);

But what I need help with is that I'm trying to use this on a mission that IS NOT domination, and so where do I place this code to get it to work. Do i need to make new .sqf files?

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  

×