The-Programmer Forum

Maxence a écrit le dernier message :
#2
Hello !
Dans le config_master du script dans ta mission, remplace itemGiven = ""; par :
Code:
itemGiven[] = {"item_1","item_2"};
Ensuite, dans ton @The_Programmer/addons/growing_system/client/fn_pickupPlante.sqf, remplace ces lignes :
Code:
_itemGet = getText (_curConfig >> _plant_type >> "itemGiven");
_itemName = localize (getText (missionConfigFile >> "VirtualItems" >> _itemGet >> "displayName"));

_amount = (round(random(_amount_max)) + _amount_min)-1;

_diff = [_itemGet,_amount,life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff;
if (_diff == 0) exitWith {hint localize "STR_NOTF_InvFull"; life_action_gathering = false;};

player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
waitUntil {
    animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
};

if ([true,_itemGet,_diff] call life_fnc_handleInv) then {
    titleText [format [(["STR_SUCCESS_PICKUP","Max_Settings_Plants","Plants_Localization"] call theprogrammer_core_fnc_localize),_diff,_itemName],"PLAIN"];
};
par ces lignes :
Code:
_itemGet = getArray (_curConfig >> _plant_type >> "itemGiven");
_text = "Vous n'avez plus de place dans votre inventaire !";

{
    _itemName = localize (getText (missionConfigFile >> "VirtualItems" >> _x >> "displayName"));
    _amount = (round(random(_amount_max)) + _amount_min)-1;

    _diff = [_x,_amount,life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff;
    if (_diff > 0) then {
        if (_text == "Vous n'avez plus de place dans votre inventaire !") then {
            _text = format ["Vous avez rammasé %1 %2",_diff,_itemName];
        } else {
            _text = _text + format [" et %1 %2",_diff,_itemName];
        };
        [true,_x,_diff] call life_fnc_handleInv;
    };
} forEach _itemGet;

player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
waitUntil {
    animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
};

titleText [_text,"PLAIN"];

Dis-moi si ça fonctionne :)