Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- Suche Artefakte by BrandyScotchland
- */
- if(life_action_inUse) exitWith {["Keine zweite Aktion Möglich",true,"fast"] call life_fnc_notification_system;};
- if((vehicle player) != player) exitWith {};
- life_action_inUse = true;
- _markerPos = markerPos "Artefakte";
- _meters = _markerPos distance player;
- if(_meters > 100) exitWith {
- life_action_inUse = false;
- ["Hier findest du keine Artefakte",true,"fast"] call life_fnc_notification_system;
- };
- closeDialog 0;
- AbbruchWdrop = false;
- SAMMELN = true;
- ["Bleibe in einem Radius von 100m",false,"fast"] call life_fnc_notification_system;
- _upp = "Suche Artefakte...";
- disableSerialization;
- 5 cutRsc ["life_progress","PLAIN"];
- _ui = uiNameSpace getVariable "life_progress";
- _progress = _ui displayCtrl 38201;
- _pgText = _ui displayCtrl 38202;
- _pgText ctrlSetText format["%2 (1%1)...","%",_upp];
- _progress progressSetPosition 0.01;
- _cP = 0.01;
- _success=false;
- while{true} do {
- uiSleep 1;
- _cP = _cP + 0.01;
- _progress progressSetPosition _cP;
- _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
- if(_cP >= 1) exitWith {SAMMELN = false;};
- if(!alive player) exitWith {};
- _markerPos = markerPos "Artefakte";
- _entfernt = markerPos distance player;
- if(_entfernt > 100) exitWith {
- ["Bleibe in einem Radius von 100m",true,"fast"] call life_fnc_notification_system;
- AbbruchWdrop = true;
- };
- };
- 5 cutText ["","PLAIN"];
- sleep 1;
- life_action_inUse = false;
- if(AbbruchWdrop) exitWith {["Keine Artefakt für dich!",true,"fast"] call life_fnc_notification_system;};
- _rnd = round(random(10));
- if(_rnd < 3) exitWith {["Du hast kein Artefakt gefunden. Suche weiter...",true,"fast"] call life_fnc_notification_system;};
- if(life_inv_artifact > 1) exitWith {["Du hast nicht genug Platz!",true,"fast"] call life_fnc_notification_system;};
- [true,"artifact",1] call life_fnc_handleInv;
- ["Du hast ein Artefakt gefunden!",false,"fast"] call life_fnc_notification_system;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement