SHARE
TWEET

Untitled

a guest Sep 14th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "..\..\script_macros.hpp"
  2. /*
  3.     Suche Artefakte by BrandyScotchland
  4. */
  5. if(life_action_inUse) exitWith {["Keine zweite Aktion Möglich",true,"fast"] call life_fnc_notification_system;};
  6. if((vehicle player) != player) exitWith {};
  7.  
  8. life_action_inUse = true;
  9. _markerPos = markerPos "Artefakte";
  10. _meters = _markerPos distance player;
  11. if(_meters > 100) exitWith {
  12.     life_action_inUse = false;
  13.     ["Hier findest du keine Artefakte",true,"fast"] call life_fnc_notification_system;
  14. };
  15. closeDialog 0;
  16. AbbruchWdrop = false;
  17. SAMMELN = true;
  18.  
  19. ["Bleibe in einem Radius von 100m",false,"fast"] call life_fnc_notification_system;
  20.  
  21. _upp = "Suche Artefakte...";
  22. disableSerialization;
  23. 5 cutRsc ["life_progress","PLAIN"];
  24. _ui = uiNameSpace getVariable "life_progress";
  25. _progress = _ui displayCtrl 38201;
  26. _pgText = _ui displayCtrl 38202;
  27. _pgText ctrlSetText format["%2 (1%1)...","%",_upp];
  28. _progress progressSetPosition 0.01;
  29. _cP = 0.01;
  30. _success=false;
  31.  
  32. while{true} do {
  33.     uiSleep 1;
  34.     _cP = _cP + 0.01;
  35.     _progress progressSetPosition _cP;
  36.     _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
  37.     if(_cP >= 1) exitWith {SAMMELN = false;};
  38.     if(!alive player) exitWith {};
  39.    
  40.     _markerPos = markerPos "Artefakte";
  41.     _entfernt = markerPos distance player;
  42.     if(_entfernt > 100) exitWith {
  43.         ["Bleibe in einem Radius von 100m",true,"fast"] call life_fnc_notification_system;
  44.         AbbruchWdrop = true;
  45.     };
  46. };
  47.  
  48. 5 cutText ["","PLAIN"];
  49. sleep 1;
  50. life_action_inUse = false;
  51. if(AbbruchWdrop) exitWith {["Keine Artefakt für dich!",true,"fast"] call life_fnc_notification_system;};
  52. _rnd = round(random(10));
  53. if(_rnd < 3) exitWith {["Du hast kein Artefakt gefunden. Suche weiter...",true,"fast"] call life_fnc_notification_system;};
  54. if(life_inv_artifact > 1) exitWith {["Du hast nicht genug Platz!",true,"fast"] call life_fnc_notification_system;};
  55. [true,"artifact",1] call life_fnc_handleInv;
  56. ["Du hast ein Artefakt gefunden!",false,"fast"] call life_fnc_notification_system;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top