Habe mir erlaubt das ganze ein bisschen mehr ans life anzupassen mit ladebalken wären dem bau...wichtig die XXXXXXXXXX zu ersetzen
Code
_upp = "Du baust ein XXXXXXXXXXXX";
//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;life_action_inUse = true;
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"; };
sleep 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";_vehicle = createVehicle ["XXXXXXXXXXX", position player, [], 0, "NONE"];waitUntil {!isNil "_vehicle"}; //Warten_vehicle allowDamage false;_vehicle lock 2;_vehicle allowDamage true;[_vehicle] call life_fnc_clearVehicleAmmo;[_vehicle,"trunk_in_use",false,true] remoteExec ["TON_fnc_setObjVar", 2];[_vehicle,"vehicle_info_owners",[[getPlayerUID player,profileName]],true] remoteExec ["TON_fnc_setObjVar", 2];_vehicle disableTIEquipment true;life_vehicles pushBack _vehicle;[getPlayerUID player,playerSide,_vehicle,1] remoteExec ["TON_fnc_keyManagement", 2];[(getPlayerUID player),playerSide,_vehicle,0] remoteExec ["TON_fnc_vehicleCreate", 2];[0] call SOCK_fnc_updatePartial;