-
Notifications
You must be signed in to change notification settings - Fork 0
Component: Armory
PhILoXs edited this page Sep 22, 2023
·
16 revisions
Author: PhILoX
Description: Adds a GUI for database saved loadouts and backpacks and your are able to equip players directly from the database. Does nothing if server hasn't loaded extdb3 (see: Database).
- Create a MySQL/Maria database on the server and run this SQL script: Armory Database
- Install extDB3 (Installation) on your server and save the following extDB3 custom ini file into the sql_custom folder of extdb3: armory.ini
The following setting inextdb3-conf.ini
is advised:Allow Reset = true
(This is only needed if you restart or switch missions in one server session.) - Start the game and check if the RPT has following lines signaling that the database connection was succesful:
[MTS] (database) INFO: Connected to database 'armory' [MTS] (database) INFO: Protocol 'armory.ini' loaded
- Create your first equipment category (check the function header for more information of the parameters)
["enhanced", ["00000000000000000"]] call mts_armory_fnc_createEquipment;
- Use the example action on an object and change it to your needs
Vanilla:
this addAction ["Equipment: enhanced", {["enhanced", _this select 0] call mts_armory_fnc_openArmory}, nil, 1.5, true, true, "", "true", 5];
ACE3:
private _actionOpenArmory = [
"ace_interact_openArmory",
"Equipment: enhanced",
"",
{
params ["_object", "", "_params"];
_params params ["_equipmentName"];
[_equipmentName, _object] call mts_armory_fnc_openArmory;
},
{true},
{},
["enhanced"]
] call ace_interact_menu_fnc_createAction;
[this, 0, ["ACE_MainActions"], _actionOpenArmory] call ace_interact_menu_fnc_addActionToObject;
All relevant information is in the function header
- mts_armory_fnc_createEquipment
- mts_armory_fnc_openArmory
- mts_armory_fnc_equipLoadout
- mts_armory_fnc_equipBackpack
The extDB3 connection will only be established on dedicated servers. If you want to test it on your machine, you need to check the CBA setting "DEBUG: Allow Player database connection"