Hello,
Are you tired of editing your config_master.hpp every time you create an item?
Do you want all your items without exception in player inventories to be saved in a database?
Do as I do, choose the facility.
1 - Go to the root of your mission.
2 - Rendez-vous dans \config\Config_Master.hpp.
3 - Delete this line :
4 - See you in /core/functions/fn_saveGear.sqf.
5 - Replace this line :
by this one
6 - Delete this line :
7 - Replace this code block :
by this one :
That's all. That's all. Easy, huh?
Are you tired of editing your config_master.hpp every time you create an item?
Do you want all your items without exception in player inventories to be saved in a database?
Do as I do, choose the facility.
1 - Go to the root of your mission.
2 - Rendez-vous dans \config\Config_Master.hpp.
3 - Delete this line :
Code:
saved_virtualItems[] = { "pickaxe","fuelEmpty","fuelFull", "spikeStrip", "lockpick", "defuseKit","storageSmall","storageBig","redgull","coffee","waterBottle","apple","peach","tbacon","donuts","rabbit","salema","ornate","mackerel","tuna","mullet","catshark","turtle_soup","hen","rooster","sheep","goat","defibrillator","toolkit" }; //Array of virtual items that can be saved on your player.
4 - See you in /core/functions/fn_saveGear.sqf.
5 - Replace this line :
Code:
private ["_return","_uItems","_bItems","_vItems","_pItems","_hItems","_yItems","_uMags","_vMags","_bMags","_pMag","_hMag","_uni","_ves","_bag","_handled","_savedVirtualItems"];
Code:
private ["_return","_uItems","_bItems","_vItems","_pItems","_hItems","_yItems","_uMags","_vMags","_bMags","_pMag","_hMag","_uni","_ves","_bag","_handled"];
6 - Delete this line :
Code:
_savedVirtualItems = LIFE_SETTINGS(getArray,"saved_virtualItems");
7 - Replace this code block :
Code:
{
_val = ITEM_VALUE(_x);
if (_val > 0) then {
_yItems pushBack [_x,_val];
};
} forEach _savedVirtualItems;
Code:
{
_val = ITEM_VALUE(configName _x);
if (_val > 0) then {
_var = getText (_x >> 'variable');
_yItems pushBack [_var,_val];
};
} forEach ("true" configClasses (missionConfigFile >> "VirtualItems"));
That's all. That's all. Easy, huh?