Hello to you all, my favorite German community.
I try at present to define for every backpack a storage capacity.
Here is at present of what I managed to make:
----------------------------------------------------------------------------------------------------------------------------------------------------------
In core/fn_survival.sqf, i remove without replace :
/* Adjustment of carrying capacity based on backpack changes */
if (backpack player isEqualTo "") then {
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
_bp = backpack player;
} else {
if (!(backpack player isEqualTo "") && {!(backpack player isEqualTo _bp)}) then {
_bp = backpack player;
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",_bp,"maximumload") / 4);
};
};
Alles anzeigen
----------------------------------------------------------------------------------------------------------------------------------------------------------
In core/configuration.sqf, i replace :
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).
By that :
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight"); //Static variable representing the players max carrying weight on start.
life_minWeight = life_maxWeight; //Identifies the max carrying weight (gets adjusted throughout game when wearing different types of clothing).
life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).
----------------------------------------------------------------------------------------------------------------------------------------------------------
In core/functions/fn_loadGear.sqf, i replace :
By that :
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
/* Réglage de la capacité en fonction des sac à dos */
[] spawn
{
while{true} do
{
waitUntil {!(EQUAL(backpack player,""))};
_bp = backpack player;
_cfg = FETCH_CONFIG2(getNumber,CONFIG_VEHICLES,_bp,"maximumload");
_load = round(_cfg / 4);
if(EQUAL(backpack player,"B_AssaultPack_khk")) then { _load = 30; };
if(EQUAL(backpack player,"B_AssaultPack_Kerry")) then { _load = 30; };
if(EQUAL(backpack player,"B_AssaultPack_blk")) then { _load = 30; };
if(EQUAL(backpack player,"B_AssaultPack_cbr")) then { _load = 30; };
if(EQUAL(backpack player,"B_AssaultPack_sgg")) then { _load = 30; };
if(EQUAL(backpack player,"B_Bergen_blk")) then { _load = 50; };
if(EQUAL(backpack player,"B_TacticalPack_oli")) then { _load = 50; };
if(EQUAL(backpack player,"B_Bergen_sgg")) then { _load = 50; };
if(EQUAL(backpack player,"B_Bergen_rgr")) then { _load = 50; };
if(EQUAL(backpack player,"B_AssaultPack_mcamo_AT")) then { _load = 70; };
if(EQUAL(backpack player,"B_Kitbag_cbr")) then { _load = 70; };
if(EQUAL(backpack player,"B_Kitbag_sgg")) then { _load = 70; };
if(EQUAL(backpack player,"B_Carryall_khk")) then { _load = 80; };
if(EQUAL(backpack player,"B_Carryall_oli")) then { _load = 80; };
if(EQUAL(backpack player,"B_Carryall_cbr")) then { _load = 80; };
life_maxWeight = life_minWeight + _load;
waitUntil {!(EQUAL(backpack player,_bp))};
if(EQUAL(backpack player,"")) then {
life_maxWeight = life_minWeight;
};
};
};
Alles anzeigen
Everything goes well (no error) but the capacity of all the backpack is of zero, why ?
For example, the backpack "B_Carryall_cbr" has to have a capacity of 80 !