Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- file: fn_GasolineraSanti
- Autor:Mr.SF
- Description:robo a gasolinera
- */
- private["_ladron","_tienda","_dinero","_ui","_progreso","_pgText","_cP","_rip","_pos"];
- _tienda = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
- _ladron = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param;
- _accion = [_this,2] call BIS_fnc_param;
- if(side _ladron != civilian) exitWith { hint "No puedes robar esta gasolinera" };
- if(_ladron distance _tienda > 10) exitWith { hint "Debes estar a menos de 10 metros para efectuar el robo" };
- if !(_dinero) then { _dinero = 1000; };
- if (_rip) exitWith { hint "Adelanto del robo" };
- if (vehicle player != _ladron) exitWith { hint "Salga del vehiculo para robar" };
- if !(alive _ladron) exitWith {};
- if (currentWeapon _ladron == "") exitWith { hint "HaHa, no me amenazas con eso, pierdete antes de que llame a la policía!" };
- if (currentWeapon _ladron == "Binocular") exitWith { hintSilent "¿Que pasa con esos prismaticos Quieres venderls? 5 euros!" };
- if (currentWeapon _ladron == "Rangefinder") exitWith { hintSilent "No me amenaces , fuera de yaa!" };
- if (robosactivos >= 2) exitWith {hint "Ya hay mas de 2 robos activos, se cerro automaticamente la caja fuerte!"};
- if (_dinero == 0) exitWith { hint "No queda dinero en la caja" };
- _rip = true;
- _dinero = 20000 + round(random 10000);
- _tienda removeAction _accionion;
- _tienda switchMove "AmovPercMstpSsurWnonDnon";
- _posibilidad = random(100);
- if(_posibilidad < 50) then { hint "¡Santi a tocado la alarma,viene la policia!"; [[1,format["ALERTA GASOLINERA: %1 está siendo robada!", _tienda]],"life_fnc_broadcast",west,false] spawn life_fnc_MP; };
- _policias = (west countSide playableUnits);
- if(_policias < 2) exitWith{[[_vault,-1],"disableSerialization;",false,false] spawn life_fnc_MP; hint "No hay suficientes policias para robar";};
- disableSerialization;
- 5 cutRsc ["life_progress","PLAIN"];
- _ui = uiNameSpace getVariable "life_progress";
- _progreso = _ui displayCtrl 38201;
- _pgText = _ui displayCtrl 38202;
- _pgText ctrlSetText format["ROBO EN PROGRESO DEBERÁ ESTAR A MENOS DE 10 METROS (1%1)...","%"];
- _progreso progressSetPosition 0.01;
- _cP = 0.01;
- if(_rip) then
- {
- while{true} do
- {
- sleep 0.8;
- _cP = _cP + 0.01;
- _progreso progressSetPosition _cP;
- _pgText ctrlSetText format["ROBO EN PROGRESO DEBERÁ ESTAR A MENOS DE 10 METROS (%1%2)...",round(_cP * 100),"%"];
- _posicion = position player;
- _marcador = createMarker ["Marker200", _posicion];
- "Marker200" setMarkerColor "ColorRed";
- "Marker200" setMarkerText "ATENCIÓN! ESTAN ROBANDO AQUI!!";
- "Marker200" setMarkerType "mil_warning";
- if(_cP >= 1) exitWith {};
- if(_ladron distance _tienda > 10) exitWith { };
- if!(alive _ladron) exitWith {};
- };
- if!(alive _ladron) exitWith { _rip = false; };
- if(_ladron distance _tienda > 10) exitWith { deleteMarker "Marker200"; _tienda switchMove ""; hint "Necesitas mantenerte a menos de 10 metros para robar"; 5 cutText ["","PLAIN"]; _rip = false; };
- 5 cutText ["","PLAIN"];
- titleText[format["Usted robo %1 euros,Corre antes de que te pille la policía!",[_dinero] call life_fnc_numberText],"PLAIN"];
- deleteMarker "Marker200";
- life_cash = life_cash + _dinero;
- _rip = false;
- life_use_atm = false;
- sleep (60 + random(180));
- life_use_atm = true;
- if!(alive _ladron) exitWith {};
- [[getPlayerUID _ladron,name _ladron,"211"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
- };
- sleep 300;
- _accion = _tienda addAction["Atracar a Santi",life_fnc_robShops];
- _tienda switchMove "";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement