Search the Community
Showing results for tags 'witelist'.
Found 1 result
Hi to all! For my server, it was necessary to perform a whitelist for players who connect to the server. To do this, I created a separate mod that works almost perfectly, but the problem is that checking for all given parameters occurs only after a briefing. How to run a script in an addon loop for example when starting the server itself or when connecting the player to the server (not in the game - possibly in the lobby or simply connecting the mission selection screen). Here is my example implementation: config.cpp In config, we create a Security class and set the preInit parameter (I understand that it executes before loading the mission, and I need it when connecting to the server) fn_init.sqf And it works as follows: the server has a config containing an array of player data (name, guid, ban status) and an access password (required in the server configuration using the command serverCommandPassword = "010101"; specify the same password which is also in the "Security \ functions \ config.ccp"). Then after the start of the game (after the briefing) the script makes a check: 1) The presence of GUID in whiteList, if not - kick, if so then step two 2) Checking player on banned: if paremetr false - then next step if parametr true - so does the kick. 3) Checking the registered name if it does not match what is indicated in the whiteList - kick 4) If the player passes all three checks, he successfully connected the game and receives a notification in the chat "Accepted". And now my main question to the specialists (if they are still here is): How to make this script work not when the mission starts, but when the server starts? Any variations are accepted (When connecting the player, when starting in the lobby (but not further than the lobby), it can be a cycle or something). Maybe something smarter than this nonsense.