if (!([false,_data,(parseNumber _value)] call life_fnc_handleInv)) exitWith {hint localize "STR_NOTF_couldNotRemoveThatMuch";};
_pos = player modelToWorld[0,3,0];
_pos = [(_pos select 0),(_pos select 1),0];
_obj = "Land_Suitcase_F" createVehicle _pos;
[_obj] remoteExecCall ["life_fnc_simDisable",0];
_obj setPos _pos;
_obj setVariable ["item",[_data,(parseNumber _value)],true];
drop
. Voici un exemple de code pour t'aider à démarrer :_malette = "B_Carryall_oli" createVehicle position player;
_malette additem "Item1";
_malette additem "Item2";
// Ajoute d'autres objets à la mallette si nécessaire
// Supprime l'item de l'inventaire sur le téléphone
// ...
// Assure-toi de gérer la possibilité de ramasser la mallette avec les objets à l'intérieur
if (!([false,_data,(parseNumber _value)] call life_fnc_handleInv)) exitWith {hint localize "STR_NOTF_couldNotRemoveThatMuch";};
_pos = player modelToWorld[0,3,0];
_pos = [(_pos select 0),(_pos select 1),0];
_obj = "Land_Suitcase_F" createVehicle _pos;
[_obj] remoteExecCall ["life_fnc_simDisable",0];
_obj setPos _pos;
_obj setVariable ["item",[_data,(parseNumber _value)],true];
if !([false,_item,_parsedAmount] call life_fnc_handleInv) exitWith {hint localize "STR_NOTF_couldNotRemoveThatMuch";};
_pos = player modelToWorld[0,3,0];
_pos = [(_pos select 0),(_pos select 1),0];
_obj = "Land_Suitcase_F" createVehicle _pos;
[_obj] remoteExecCall ["life_fnc_simDisable",0];
_obj setPos _pos;
_obj setVariable ["item",[_item,_parsedAmount],true];
Sa ne fonctionne malheureusement pas non plusSi tu as l'Iphone XI, il faut modifier le fichier @The_Programmer/addons/iphone_xi/client/apps/tp_apps_removeItem.sqf
Trouve cette ligne :
Et ajoute en dessous :Code:if !([false,_item,_parsedAmount] call life_fnc_handleInv) exitWith {hint localize "STR_NOTF_couldNotRemoveThatMuch";};
Code:_pos = player modelToWorld[0,3,0]; _pos = [(_pos select 0),(_pos select 1),0]; _obj = "Land_Can_V3_F" createVehicle _pos; [_obj] remoteExecCall ["life_fnc_simDisable",0]; _obj setPos _pos; _obj setVariable ["item",[_item,_parsedAmount],true];
/*
Author: Maxence
Web site: www.the-programmer.com
Discord: Rejoins le serveur Discord The-Programmer !
Terms of use:
- This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
- If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
- Out of respect for the author please do not delete this information.
*/
if ((lbCurSel 2005) isEqualTo -1) exitWith {hint localize "STR_NOTF_didNotSelectToRemove";};
_item = lbData [2005,(lbCurSel 2005)];
if (_item isEqualTo "") exitWith {hint localize "STR_NOTF_didNotSelectToRemove";};
_amount = ctrlText 04201506;
if !([_amount] call TON_fnc_isnumber) exitWith {hint localize "STR_NOTF_notNumberFormat";};
_parsedAmount = parseNumber _amount;
if (_parsedAmount <= 0) exitWith {hint localize "STR_NOTF_enterAmountRemove";};
if (((getNumber (missionConfigFile >> "VirtualItems" >> _item >> "illegal")) isEqualTo 1) && ([west,visiblePosition player,100] call life_fnc_nearUnits)) exitWith {titleText [localize "STR_NOTF_illegalItemCannotDispose","PLAIN"]};
if !(isNull objectParent player) exitWith {titleText [localize "STR_NOTF_cannotRemoveInVeh","PLAIN"];};
if !([false,_item,_parsedAmount] call life_fnc_handleInv) exitWith {hint localize "STR_NOTF_couldNotRemoveThatMuch";};
_pos = player modelToWorld[0,3,0];
_pos = [(_pos select 0),(_pos select 1),0];
_obj = "Land_Can_V3_F" createVehicle _pos;
[_obj] remoteExecCall ["life_fnc_simDisable",0];
_obj setPos _pos;
_obj setVariable ["item",[_item,_parsedAmount],true];
hint format [localize "STR_NOTF_removedFromInventory",_parsedAmount,(localize (getText (missionConfigFile >> "VirtualItems" >> _item >> "displayName")))];
[] call the_programmer_iphone_xi_fnc_apps_inventory;
Effectivement j’ai remarqué sa avant j’ai pas penser à le noter iciÇa fonctionne bien chez moi
Juste la classname de l'item était une petite cannette "Land_Can_V3_F", tu peux la remplacer par une valise "Land_Suitcase_F"
Voir la pièce jointe 4750