From 2d523189f107a61eaf13980f8140e1f3ae4a88ff Mon Sep 17 00:00:00 2001 From: NRZ7 Date: Sat, 8 Oct 2016 20:10:17 +0200 Subject: [PATCH] More undestandable comments --- addons/modChecker/modChecker.sqf | 45 +++++++++++++++++++++++--------- initPlayerLocal.sqf | 8 ++---- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/addons/modChecker/modChecker.sqf b/addons/modChecker/modChecker.sqf index cf61623..a19eb4b 100644 --- a/addons/modChecker/modChecker.sqf +++ b/addons/modChecker/modChecker.sqf @@ -5,18 +5,21 @@ // @file Name: modChecker.sqf // @file Author: NRZ7 (www.standarol.com) // @description: This script check the mods loaded by the client. If any mod is not loaded, pop's a screen with detailed information and clickable community links (modCheckerDisplay.sqf). -// You can configure requiered addons (error 99) or optional addons (error 1). If any required mod fails, the client load "You Loose" screen after close the dialog. -// +// You can configure requiered addons (errorLevel 99) or optional addons (errorLevel 1). If any mod fails or this script is manually executed, launch modCheckerDisplay.sqf +// You can execute this script running this code in local // [] execVM "addons\scripts\modChecker.sqf" -errorLevel = 0; +errorLevel = 0; // Do not touch. Set errors to 0 before run modChecker.sqf +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Exile_Client Example - READ TO UNDERSTAND - DO NOT TOUCH - READ - DO NOT TOUCH - READ - DO NOT TOUCH +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Exile_Client Example -// Change "Exile_Client" to name of the Cfg patche from desired mod +// Change "Exile_Client" to name of the CfgPatches from desired mod. +// You can find under editor. ("Tools" - "Config Viewer" - "Configfile" - "CfpPatches") if (isClass(configFile >> "CfgPatches" >> "Exile_Client")) then { -// Change checkExile to your desired mod variable name -// Change "Exile Mod is" to your mod string +// Change checkExile to your desired and unique mod variable name +// Change "Exile Mod is" to your mod string. For advanced users, can change size, color, allign, etc. checkExile = "Exile Mod is found!
"; } else { // Change "Exile Mod is" to your mod string @@ -25,6 +28,10 @@ if (isClass(configFile >> "CfgPatches" >> "Exile_Client")) then { errorLevel = errorLevel + 99 }; +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// START OF MODS CONFIG - EDIT OR DELETE UNDER THIS LINE +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Esseker Example - DELETE OR MODIFY if (isClass(configFile >> "CfgPatches" >> "Esseker")) then { checkEsseker = "Esseker Map is found!
"; @@ -82,20 +89,34 @@ if (isClass(configFile >> "CfgPatches" >> "CBA_main")) then errorLevel = errorLevel + 1 }; + +// YOU CAN ADD MORE MODS, ADD FOR EACH SOME CODE LIKE THIS + +/* +if (isClass(configFile >> "CfgPatches" >> "YOUR_MOD_CLASSNAME")) then + { + checkYOURMOD = "YOUR MOD is found!
"; + } else { + checkYOURMOD = "YOUR MOD is NOT FOUND!
"; + errorLevel = errorLevel + 1 + }; +*/ + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DO NOT TOUCH UNDER THIS LINE IF DON'T KNOW WHAT ARE YOU DOING ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (errorLevel > 0) then { - warnMessage = "Some is WRONG with your MODS
"; + warnMessage = "Some is WRONG with your MODS
"; // General error message } else { - warnMessage = "All MODS are FINE
"; + warnMessage = "All MODS are FINE
"; // All mods are loaded message }; -if ((errorLevel == 0) && (firstCheck == 0)) then { - firstCheck = 1 // Do nothing +if ((errorLevel == 0) && (firstCheck == 0)) then { + firstCheck = 1 } else { - execVM "addons\modChecker\modCheckerDisplay.sqf" + execVM "addons\modChecker\modCheckerDisplay.sqf" }; // execVM "addons\modChecker\modCheckerDisplay.sqf" diff --git a/initPlayerLocal.sqf b/initPlayerLocal.sqf index 227ade8..7e0659c 100644 --- a/initPlayerLocal.sqf +++ b/initPlayerLocal.sqf @@ -10,19 +10,15 @@ uiSleep 3; firstCheck = 0; execVM "addons\modChecker\modChecker.sqf"; +/*Note, if you have Exile ProtectionRemember.sqf, use this + /////////////////////////////////////////////////////////////////////////// // MOD CHECKER + PROTECTION REMEMBER /////////////////////////////////////////////////////////////////////////// -/*Note, if you have Exile ProtectionRemember.sqf, use this - waitUntil {!isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && getPlayerUID player != ''}; // wait until player is in spawned uiSleep 3; execVM "addons\scripts\protectionRemember.sqf"; -/////////////////////////////////////////////////////////////////////////// -// MOD CHECKER -/////////////////////////////////////////////////////////////////////////// - firstCheck = 0; execVM "addons\modChecker\modChecker.sqf";