Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. /*
  2. SCRIPT fn_CraftF.sqf
  3. par BlackDeker/LeTemplier/Beret Noirs
  4. */
  5.  
  6. params["_mode", ""];
  7.  
  8. private _display = uinameSpace getvariable ["MonDisplay", displayNull];
  9. private _ctrl = (_display displayCtrl 1503);
  10.  
  11. {
  12. CraftM_One = ((PlayerInventory select _forEachIndex)select 0);
  13. CraftM_Two = ((PlayerInventory select _forEachIndex)select 1);
  14. } forEach PlayerInventory;
  15.  
  16.  
  17. if (_ctrl lbIsSelected 0) then
  18. {
  19. if (CraftM_One isEqualTo "Fourniture De Matière") then
  20. {
  21. if (CraftM_Two >= 10) then
  22. {
  23. private _oldValue = missionNamespace getVariable "oldValue";
  24. _AON_IncrementCraft = profileNamespace getVariable "AON_IncrementCraft";
  25. _Value = 1;
  26. private _CraftedItem = "Fromage";
  27. if (_AON_IncrementCraft > 0) then
  28. {
  29. _Value = _oldValue + _Value;
  30. PlayerInventory pushBack [_CraftedItem,_Value];
  31. hint "Ok ça passe";
  32. }else{
  33. hint "Ok";
  34. PlayerInventory pushBack [_CraftedItem,_Value];
  35. };
  36.  
  37. if (_AON_IncrementCraft > 0) then
  38. {
  39. missionNamespace setVariable["oldValue", _Value];
  40. _oldValue = missionNamespace getVariable "oldValue";
  41. };
  42.  
  43. profileNamespace setVariable["AON_IncrementCraft",1];
  44.  
  45. hint format ["Vous avez obtenu - %1 %2 ------ %3",_Value,_CraftedItem,PlayerInventory];
  46. };
  47. };
  48. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement