Jump to content
ALPHIVE

How make reserved slots ?

Recommended Posts

Hi everybody !

 

Im trying to make reserved slots, but even if i tried this script 

 or others it doesnt work

 

Can someone help me about this ? someone do have a reserved slot complete script working ?

 

 

Thank you guys for you help 

 

ALPHIVE

Share this post


Link to post
Share on other sites
2 hours ago, ALPHIVE said:

Im trying to make reserved slots,

 

Hello there ALPHIVE !

 

Larrow had a great example and i have edit this to a working one file here :

 

Share this post


Link to post
Share on other sites

below the whole stuff :

 

nsM81aJ.png

 

info.txt

Spoiler






//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


Then in each units init that you want to be a reserved unit place


this setVariable ["Reserved",true];


You can also change their description by filling out the Description section in the insert unit dialog with something like

Group leader (Reserved)

So people know what units not to choose in the lobby.

 

allowedIDs.txt

Spoiler




//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


/*
allowedIDs.txt 
<< this file gets placed in the folder where your servers Arma3.exe is, 
it keeps the IDs private as they are not transmitted with the mission and 
can be updated for all your missions in one place.

server.cfg file on the server too.
allowedFilePatching = 1;


Fill the ARRAY with allowed UIDs - steam IDs
Look something like "76566179256348507"
*/

["76566179256348507","76566179256348507"];

 

 

description.ext

Spoiler




//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/

allowedFilePatching = 1;
respawn = 3;				  // 0 = none. 1 = bird. 2 = instant where died. 3 = base or respawn_INDEPENDENT marker. 4 = respawn with team, or bird. 5 = into AI or bird.
respawndelay = 10;            // Delay prior to respawn
respawnVehicleDelay = 0;      // Delay prior to respawn
respawnDialog = 0;            // default = 1. show respawn timer and scoreboard when killed.
respawnOnStart = -1;
enableDebugConsole = 1;	      // 0 = disabled. 1 = admins, 2 = everybody. 0 is recommended in MP.
allowFunctionsLog = 1;
disabledAI=1;				  // No AI in playable units
aiKills = 0;				  // disable scorelist for AI players
forceRotorLibSimulation = 0;  // Default value: 0 - options based; 1 - force enable; 2 - force disable

//____________________________________________________

corpseManagerMode = 1;
corpseLimit = 60;
corpseRemovalMinTime = 900;
corpseRemovalMaxTime = 1500;

wreckManagerMode = 1;
wreckLimit = 30;
wreckRemovalMinTime = 900;
wreckRemovalMaxTime = 1500;

//____________________________________________________

author = "Larrow";
OnLoadName = "Larrow Reserved Slot Script";	
onLoadMission = "<t color='#FF0000'>V e r s i o n    1 . 0<br /><t color='#FCEF06'>Have Fun";
loadScreen =  "images\Reserved.paa";
overviewPicture = "images\Reserved.paa";

//____________________________________________________

class Header
{
 gameType = COOP;
 minPlayers = 1;
 maxPlayers = 40;
};


//__________________________ ***  C O P Y   T H I S  *** __________________________


class CfgDebriefing
{

class NOT_ALLOWED
{
	title = "This is a reserved slot.";
	description = "This is a reserved slot. Please rejoin using a different slot. Reserved slots are clearly marked on each units description in the lobby as ( Reserved )";
	picture = "images\Reserved.paa";
};
};

 

 

initPlayerLocal.sqf

Spoiler




//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


fnc_reservedSlot = {
player enableSimulationGlobal false;
( "reserved" call BIS_fnc_rscLayer ) cutText [ 
"
This is a reserved slot. Reserved slots are clearly marked in the lobby as ( Reserved ) . 
Please rejoin using a different slot.
", "BLACK OUT", 1, true ];

sleep 10;
endMission "NOT_ALLOWED";
};

 

 

initPlayerServer.sqf

Spoiler






//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


_player = _this select 0;
_uid = getPlayerUID _player;

if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};

 

 

initServer.sqf

Spoiler




//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/

/*
allowedIDs.txt 
<< this file gets placed in the folder where your servers Arma3.exe is, 
it keeps the IDs private as they are not transmitted with the mission and 
can be updated for all your missions in one place.

server.cfg file on the server too.
allowedFilePatching = 1;
*/

//allowed = call compile preprocessFileLineNumbers "allowedIDs.txt";

//	or from here
allowed = ["76566179256348507","76566179256348507"];

 

 

 

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Could someone make a video teaching how to set up this reserved Slot script?
I'm having a hard time making it work, because my knowledge is limited in programming.

Share this post


Link to post
Share on other sites

I have followed each step and somehow i got it to work EXCEPT for the part where it allows me to use the slot. It insta kicks me. I have a allowedIDs.txt file with my steam id where the server.exe is located but it still kicks me.

Share this post


Link to post
Share on other sites

If you have an allowedIDs.txt , the initServer must run:

allowed = call compile preprocessFileLineNumbers "allowedIDs.txt";

(which is currently a simple comment in script above, so remove the double /)

and,

you must transform:

allowed = ["76566179256348507","76566179256348507"];

as comment, with double /  (_i.e. // allowed = ["76566179256348507","76566179256348507"];) or even remove this line. If not, the new allowed array will replace your previous work.

Share this post


Link to post
Share on other sites
On 9/8/2019 at 5:09 PM, GEORGE FLOROS GR said:

below the whole stuff :

 

nsM81aJ.png

 

info.txt

  Hide contents







//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


Then in each units init that you want to be a reserved unit place


this setVariable ["Reserved",true];


You can also change their description by filling out the Description section in the insert unit dialog with something like

Group leader (Reserved)

So people know what units not to choose in the lobby.

 

allowedIDs.txt

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


/*
allowedIDs.txt 
<< this file gets placed in the folder where your servers Arma3.exe is, 
it keeps the IDs private as they are not transmitted with the mission and 
can be updated for all your missions in one place.

server.cfg file on the server too.
allowedFilePatching = 1;


Fill the ARRAY with allowed UIDs - steam IDs
Look something like "76566179256348507"
*/

["76566179256348507","76566179256348507"];

 

 

description.ext

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/

allowedFilePatching = 1;
respawn = 3;				  // 0 = none. 1 = bird. 2 = instant where died. 3 = base or respawn_INDEPENDENT marker. 4 = respawn with team, or bird. 5 = into AI or bird.
respawndelay = 10;            // Delay prior to respawn
respawnVehicleDelay = 0;      // Delay prior to respawn
respawnDialog = 0;            // default = 1. show respawn timer and scoreboard when killed.
respawnOnStart = -1;
enableDebugConsole = 1;	      // 0 = disabled. 1 = admins, 2 = everybody. 0 is recommended in MP.
allowFunctionsLog = 1;
disabledAI=1;				  // No AI in playable units
aiKills = 0;				  // disable scorelist for AI players
forceRotorLibSimulation = 0;  // Default value: 0 - options based; 1 - force enable; 2 - force disable

//____________________________________________________

corpseManagerMode = 1;
corpseLimit = 60;
corpseRemovalMinTime = 900;
corpseRemovalMaxTime = 1500;

wreckManagerMode = 1;
wreckLimit = 30;
wreckRemovalMinTime = 900;
wreckRemovalMaxTime = 1500;

//____________________________________________________

author = "Larrow";
OnLoadName = "Larrow Reserved Slot Script";	
onLoadMission = "<t color='#FF0000'>V e r s i o n    1 . 0<br /><t color='#FCEF06'>Have Fun";
loadScreen =  "images\Reserved.paa";
overviewPicture = "images\Reserved.paa";

//____________________________________________________

class Header
{
 gameType = COOP;
 minPlayers = 1;
 maxPlayers = 40;
};


//__________________________ ***  C O P Y   T H I S  *** __________________________


class CfgDebriefing
{

class NOT_ALLOWED
{
	title = "This is a reserved slot.";
	description = "This is a reserved slot. Please rejoin using a different slot. Reserved slots are clearly marked on each units description in the lobby as ( Reserved )";
	picture = "images\Reserved.paa";
};
};

 

 

initPlayerLocal.sqf

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


fnc_reservedSlot = {
player enableSimulationGlobal false;
( "reserved" call BIS_fnc_rscLayer ) cutText [ 
"
This is a reserved slot. Reserved slots are clearly marked in the lobby as ( Reserved ) . 
Please rejoin using a different slot.
", "BLACK OUT", 1, true ];

sleep 10;
endMission "NOT_ALLOWED";
};

 

 

initPlayerServer.sqf

  Hide contents







//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


_player = _this select 0;
_uid = getPlayerUID _player;

if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};

 

 

initServer.sqf

  Hide contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/

/*
allowedIDs.txt 
<< this file gets placed in the folder where your servers Arma3.exe is, 
it keeps the IDs private as they are not transmitted with the mission and 
can be updated for all your missions in one place.

server.cfg file on the server too.
allowedFilePatching = 1;
*/

//allowed = call compile preprocessFileLineNumbers "allowedIDs.txt";

//	or from here
allowed = ["76566179256348507","76566179256348507"];

 

 

 

 

CHANGE THE CODE FOR THE initPlayerServer TO WHATS BELOW IF YOU CANT GET IT TO WORK.
initPlayerServer:
_player = _this select 0;
_uid = getPlayerUID _player;
diag_log str allowed;
diag_log str _player;
diag_log str (_player getVariable [ "reserved", false ]);
if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};

  • Like 1

Share this post


Link to post
Share on other sites

Probably too late for this , I have followed the instructions.

It is giving error of "Error undefined variable in expression: allowed"

 

help please.

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

×