cobrosstuidos 12 Posted June 23, 2015 Is there a way to lock out player slots? For example. I don't want random pubbies joining Slots 1 - 10, just specific players (friends) is there a script for this? I can't seem to find any help anywhere, just a few unresolved ArmA 2 discussions which no arma 2 script has worked for me (porting to A3) Any help would be great! Share this post Link to post Share on other sites
Larrow 2822 Posted June 23, 2015 A number of different ways you can go about this, many of which have been discussed a number of times in this forum section. Heres one. Description.ext 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 = ""; }; }; initServer.sqf allowed = call compile preprocessFileLineNumbers "allowedIDs.txt"; initPlayerServer.sqf _player = _this select 0; _uid = getPlayerUID _player; if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then { [ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP; }; initPlayerLocal.sqf 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"; }; 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. //Fill the ARRAY with allowed UIDs - steam IDs //Look something like "76566179256348507" [ ]; 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. 1 3 Share this post Link to post Share on other sites
killzone_kid 1331 Posted June 23, 2015 roleDescription command has been added to DEV branch, might make it easier to determine who selected what slot. Share this post Link to post Share on other sites
cobrosstuidos 12 Posted June 26, 2015 A number of different ways you can go about this, many of which have been discussed a number of times in this forum section.Heres one. Description.ext 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 = ""; }; }; initServer.sqf allowed = call compile preprocessFileLineNumbers "allowedIDs.txt"; initPlayerServer.sqf _player = _this select 0; _uid = getPlayerUID _player; if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then { [ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP; }; initPlayerLocal.sqf 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"; }; 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. //Fill the ARRAY with allowed UIDs - steam IDs //Look something like "76566179256348507" [ ]; 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. thanks it's working great! Share this post Link to post Share on other sites
thedubl 43 Posted September 8, 2015 Hello,I do not have a initserver.sqf in my mission. There is no problem if I just add it in and upload it to the server all should be ok on a arma 3 server? I am just double checking. The GUID in the EPM RCON tools is the UID? Correct? UPDATE: All worked out! Thanks for sharing Larrow! Thanks, dubl Share this post Link to post Share on other sites
edisubaru 0 Posted September 29, 2015 Hey thanks for the share but I don't understand this part : Then in each units init that you want to be a reserved unit placethis 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. Where am I supposed to add this ? (I tried in the mission.sqm because the slot are specified from there, didn't work)Thanks in advance :) Share this post Link to post Share on other sites
schadler17 36 Posted September 29, 2015 Hey thanks for the share but I don't understand this part : Where am I supposed to add this ? (I tried in the mission.sqm because the slot are specified from there, didn't work) Thanks in advance :) When you create the reserved unit in the editor, you'd edit the Description and Init locations, putting them in. Share this post Link to post Share on other sites
thedubl 43 Posted October 31, 2015 Bummer... this just stop working. Nothing showing in the logs or script errors. Any ideas or other places to look? dubl Share this post Link to post Share on other sites
Larrow 2822 Posted November 1, 2015 Will be due to the filePatching restrictions added in 1.50 i think it was. This means loading allowedIDs.txt is not allowed. You would need to add the -filePatching switch to your servers start up params. Share this post Link to post Share on other sites
thedubl 43 Posted November 1, 2015 Added the -filepatching to the start params and the allowfilepatching = 1; to the server.cfg ...still not working. Does the file need to be in a new location now? Anything else I should look at? start up params: -mod=-filepatching -config=servercfg\A3server.cfg -cfg=servercfg\Users\TCAGame\Arma3.cfg -profiles=servercfg -port=2366 -maxMem=4096 -noSound -nosplash server=server netlog=false Thanks! Travis aka dubl Share this post Link to post Share on other sites
Larrow 2822 Posted November 1, 2015 Hmm shouldnt need allowFilePatching i think thats only if you want to allow file patching for clients. Try adding some debug output using isFilePatchingEnabled just to make sure its working as from your spoiler you look like you have filepatching butted right up against that mod switch and im not sure if that will cause you problems. Share this post Link to post Share on other sites
thedubl 43 Posted November 1, 2015 LARROW!!!!! Wahoo! I added a space and like magic... all is well! Thank you! Travis aka dubl Share this post Link to post Share on other sites
lunchbox35 11 Posted June 7, 2016 Hello,I do not have a initserver.sqf in my mission. There is no problem if I just add it in and upload it to the server all should be ok on a arma 3 server? I am just double checking. The GUID in the EPM RCON tools is the UID? Correct? UPDATE: All worked out! Thanks for sharing Larrow! Thanks, dubl I know this thread is old, but what did you do because I do not have an initserver.sqf. Thanks. Share this post Link to post Share on other sites
kylania 568 Posted June 7, 2016 I know this thread is old, but what did you do because I do not have an initserver.sqf. Thanks. It's a file you'd need to create. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted June 7, 2016 I know this thread is old, but what did you do because I do not have an initserver.sqf. Thanks. Event Scripts Initialization Order Share this post Link to post Share on other sites
thedubl 43 Posted June 7, 2016 I know this thread is old, but what did you do because I do not have an initserver.sqf. Thanks. Yep, create the initserver.sqf. Then add the bit, allowed = call compile preprocessFileLineNumbers "allowedIDS.txt"; Should work fine if you set the rest up correctly. Make sure you add the file patching (-filepatching) to the server startup params. dub Share this post Link to post Share on other sites
lunchbox35 11 Posted June 20, 2016 Ok tried all the above and does not seem to work. Sorry to just now be getting back but did not realize my account was not setup to notify me of replies. Any ideas on how to fix it would be greatly appreciated. Do I need to add a call somewhere for the new file? Share this post Link to post Share on other sites
kylania 568 Posted June 20, 2016 Is your initserver.sqf file listed in Windows explorer as an "SQF File" or a "Text Document"? Share this post Link to post Share on other sites
lunchbox35 11 Posted June 20, 2016 Is your initserver.sqf file listed in Windows explorer as an "SQF File" or a "Text Document"? SQF Share this post Link to post Share on other sites
thedubl 43 Posted June 20, 2016 Can send your for mission? Can you confirm you setup the startup params correctly on the server (jpeg)? You have to allow filepatching too. dub Share this post Link to post Share on other sites
lunchbox35 11 Posted June 20, 2016 Mission file is in the link below and -filepatching is in the startup. https://github.com/Spackler/RPT1 Share this post Link to post Share on other sites
thedubl 43 Posted June 20, 2016 Hey there! Quoting Larrow, "allowedIDs.txt << this file gets placed in the folder where your servers Arma3.exe", not in the mission pbo. So, on your server place the text file in the root. Everything else looks fine provided the startup params are good. dub Share this post Link to post Share on other sites
lunchbox35 11 Posted June 20, 2016 Hey there! Quoting Larrow, "allowedIDs.txt << this file gets placed in the folder where your servers Arma3.exe", not in the mission pbo. So, on your server place the text file in the root. Everything else looks fine provided the startup params are good. dub Tried that and still lets people that are not in the id list in the reserved slots. I must have something wrong. I am getting the following. http://imgur.com/CW3qeiH Share this post Link to post Share on other sites
thedubl 43 Posted June 21, 2016 Well I only looked your init files. Either the text file is not in correct location or this setVariable [ "Reserved", true ] is not in the units init or the startup params are not correct. It is up to you but I would be willing to do a screen share tomorrow if you want. I am using this one one of my severs now so I know it works. Share this post Link to post Share on other sites
thedubl 43 Posted June 21, 2016 Actually, if I am remembering correctly 1.50 filepatching is disabled. I believe you need to add this to the server.cfg file on the server too. allowedFilePatching = 1; Can you check it? Share this post Link to post Share on other sites