CORE INSTALLATION
Step 1. Inside of the archive that you downloaded from your cp, you’ll find two folders: “Server” and “Client”, drag the freex folder that you’ll find inside your client folder, inside of your mission root (missionname.island)
Step 2. Edit your description.ext and after ‘ #include “config\Config_Master.hpp” ‘ add ‘ #include “freex\handler.hpp” ‘
SCRIPT INSTALLATION
Step 1. Go into the freex folder and into handler.hpp add:
// Dialogs
#include “ruleTesting\dialogs\gui.hpp”
// Configs
#include “ruleTesting\config.hpp”
Step 2. Add the content of “client\cfgRemoteExec.txt” to your cfgRemoteExec.hpp (just below “F(bis_fnc_execvm,ANYONE)”)
Step 3. Add the content of “client\updateRequest.txt” to your “core\session\fn_updateRequest.sqf” just above
if (life_HC_isActive) then {
_packet remoteExecCall [“HC_fnc_updateRequest”,HC_Life];
} else {
_packet remoteExecCall [“DB_fnc_updateRequest”,RSERV];
};
Step 4. Unpack your life_server.pbo using any pbo decompression tool then go into “life_server\Functions\MySql\fn_queryRequest.sqf” and add the content of “server\queryRequest.txt” above
publicVariable “TON_fnc_playtime_values_request”;
Step 5. go to “life_server\Functions\MySql\fn_updateRequest.sqf” and add
“_unit = [_this,11,[],[[]]] call BIS_fnc_param; // FORMS SYSTEM” without the quotes
below “_position = ….”;
Step 6. In the same file change
switch (_side) do {
case civilian : {…};
…
};
with the content of “server\updateRequest.txt”
Step 7. go to “life_server\Functions\MySql\fn_insertRequest.sqf”
_query = format [“INSERT INTO players (pid, name, cash, bankacc, aliases, cop_licenses, med_licenses, civ_licenses, civ_gear, cop_gear, med_gear) VALUES(‘%1’, ‘%2’, ‘%3’, ‘%4’, ‘%5’,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘)”,
_uid,
_name,
_money,
_bank,
_alias
_query = format [“INSERT INTO players (pid, name, cash, bankacc, aliases, cop_licenses, med_licenses, civ_licenses, civ_gear, cop_gear, med_gear, fx_permissions,fx_testCompleted) VALUES(‘%1’, ‘%2’, ‘%3’, ‘%4’, ‘%5’,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘,'””[]””‘,’0’)”,
_uid,
_name,
_money,
_bank,
_alias
];
[] remoteExecCall [“fx_fnc_firstTest”,((allPlayers select {(getPlayerUID _x) isEqualTo _uid}) select 0)];
Step 8. drag “Client\ruleTesting” inside your “freex” folder in your mission root
Step 9. Execute the given .sql in your database, check if there’s a table named fx_tests and 2 new columns named “fx_permissions” and “fx_testCompleted” in the players table
How to use the script:
– Configure the test inside config.hpp
– To call the test just use “[“testname”] call fx_fnc_openMenu;” it will automatically check requirements etc.
– To open the reading menu use “[] call fx_fnc_openReadingMenu;”
usage example:
In police npc init
this addAction [“Submit your application”,{[“police”] call fx_fnc_openMenu;}];
life_actions pushback {player addAction[“Open Reading Menu”,{[] call fx_fnc_openReadingMenu;}];};
Enjoy!