Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- life_action_inUse = true;
- _displayName = FETCH_CONFIG2(getText,"CfgVehicles",(typeOf _veh),"displayName");
- _upp = format [localize "STR_NOTF_Repairing",_displayName];
- //Setup our progress bar.
- disableSerialization;
- "progressBar" 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;
- for "_i" from 0 to 1 step 0 do {
- if (animationState player != "AinvPknlMstpSnonWnonDnon_medic_1") then {
- [player,"AinvPknlMstpSnonWnonDnon_medic_1",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
- player switchMove "AinvPknlMstpSnonWnonDnon_medic_1";
- player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1";
- };
- uiSleep 0.27;
- _cP = _cP + 0.01;
- _progress progressSetPosition _cP;
- _pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp];
- if (_cP >= 1) exitWith {};
- if (!alive player) exitWith {};
- if !(isNull objectParent player) exitWith {};
- if (life_interrupted) exitWith {};
- };
- life_action_inUse = false;
- "progressBar" cutText ["","PLAIN"];
- player playActionNow "stop";
- if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
- if !(isNull objectParent player) exitWith {titleText[localize "STR_NOTF_ActionInVehicle","PLAIN"];};
- _sideRepairArray = LIFE_SETTINGS(getArray,"vehicle_infiniteRepair");
- //Check if playerSide has infinite repair enabled
- if (playerSide isEqualTo civilian && (_sideRepairArray select 0) isEqualTo 0) then {
- [false,"toolkit",1] call life_fnc_handleInv;
- };
- if (playerSide isEqualTo west && (_sideRepairArray select 1) isEqualTo 0) then {
- [false,"toolkit",1] call life_fnc_handleInv;
- };
- if (playerSide isEqualTo independent && (_sideRepairArray select 2) isEqualTo 0) then {
- [false,"toolkit",1] call life_fnc_handleInv;
- };
- if (playerSide isEqualTo east && (_sideRepairArray select 3) isEqualTo 0) then {
- [false,"toolkit",1] call life_fnc_handleInv;
- };
- _dep = (independent countSide playableUnits);
- If ((_dep < 1) || (_veh isKindOf "Ship") || (_veh isKindOf "Air")) Then {
- _veh setDamage 0;
- hint "Vous avez réparé votre véhicule avec succès car il y a moins de 5 membres du service public de connecté.";
- } else {
- _veh setDamage 0.5;
- hint "Vos compétences laborieuses en mécanique vous ont permis de rendre le véhicule plus ou moins en état de rouler. Vous devriez contacter un dépanneur.";
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement