/* File: fn_robShop.sqf Author: MrKraken */ private["_robber","_shop","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"]; _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; _action = [_this,2] call BIS_fnc_param; if(side _robber != civilian) exitWith { hint "Du kannst den Tankwart nicht überfallen!" }; if(_robber distance _shop > 5) exitWith { hint "Du solltest schon mit 5 Meter vor dem Wart stehen!" }; if (_rip) exitWith { hint Es überfällt schon jemand den Wart!" }; if (vehicle player != _robber) exitWith { hint "Steig aus dein Auto aus!" }; if !(alive _robber) exitWith {}; if (currentWeapon _robber == "") exitWith { hint "haha du Lauch! Hol dir ne Waffe du Pussy" }; _rip = true; _kassa = 120000 + round(random 60000); _shop removeAction _action; _shop switchMove "AmovPercMstpSsurWnonDnon"; _chance = random(100); if(_chance >= 100) then {[1,format["ALARM! - Tankwart: %1 wird überfallen!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; if((west countSide playableUnits) < 0) exitWith{ hint "Es sind nicht genug Polizisten im Staat"; }; disableSerialization; 5 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["Der Tankwart holt das Geld (10m) (1%1)...","%"]; _progress progressSetPosition 0.01; _cP = 0.0001; if(_rip) then { while{true} do { sleep 3; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["Der Tankwart holt das Geld (10m) (%1%2)...",round(_cP * 100),"%"]; _Pos = position player; // by ehno: get player pos _marker = createMarker ["Marker200", _Pos]; //by ehno: Place a Maker on the map "Marker200" setMarkerColor "ColorRed"; "Marker200" setMarkerText "!ALARM! ÜBERFALL !ALARM!"; "Marker200" setMarkerType "mil_warning"; if(_cP >= 1) exitWith {}; if(_robber distance _shop > 10.5) exitWith { }; if!(alive _robber) exitWith { 5 cutText ["","PLAIN"];}; }; if!(alive _robber) exitWith { _rip = false; 5 cutText ["","PLAIN"]; }; if(_robber distance _shop > 10.5) exitWith { 5 cutText ["","PLAIN"]; deleteMarker "Marker200"; _shop switchMove ""; hint "You need to stay within 10m to Rob registry! - Now the registry is locked."; 5 cutText ["","PLAIN"]; _rip = false; }; 5 cutText ["","PLAIN"]; titleText[format["Du hast %1 € erbeutet, nun hau ab bevor die Bullen da sind!",[_kassa] call life_fnc_numberText],"PLAIN"]; deleteMarker "Marker200"; // by ehno delete maker life_cash = life_cash + _kassa; _rip = false; if!(alive _robber) exitWith {5 cutText ["","PLAIN"];}; [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2]; }; sleep 300; _action = _shop addAction["TANKWART ÜBERFALLEN",life_fnc_robstore]; _shop switchMove "";