Advertisement
Guest User

w

a guest
Mar 26th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. /*
  2. file: fn_GasolineraSanti
  3. Autor:Mr.SF
  4. Description:robo a gasolinera
  5. */
  6. private["_ladron","_tienda","_dinero","_ui","_progreso","_pgText","_cP","_rip","_pos"];
  7. _tienda = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
  8. _ladron = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param;
  9. _accion = [_this,2] call BIS_fnc_param;
  10.  
  11. if(side _ladron != civilian) exitWith { hint "No puedes robar esta gasolinera" };
  12. if(_ladron distance _tienda > 10) exitWith { hint "Debes estar a menos de 10 metros para efectuar el robo" };
  13.  
  14. if !(_dinero) then { _dinero = 1000; };
  15. if (_rip) exitWith { hint "Adelanto del robo" };
  16. if (vehicle player != _ladron) exitWith { hint "Salga del vehiculo para robar" };
  17.  
  18. if !(alive _ladron) exitWith {};
  19. if (currentWeapon _ladron == "") exitWith { hint "HaHa, no me amenazas con eso, pierdete antes de que llame a la policía!" };
  20.  
  21. if (currentWeapon _ladron == "Binocular") exitWith { hintSilent "¿Que pasa con esos prismaticos Quieres venderls? 5 euros!" };
  22.  
  23. if (currentWeapon _ladron == "Rangefinder") exitWith { hintSilent "No me amenaces , fuera de yaa!" };
  24.  
  25. if (robosactivos >= 2) exitWith {hint "Ya hay mas de 2 robos activos, se cerro automaticamente la caja fuerte!"};
  26.  
  27. if (_dinero == 0) exitWith { hint "No queda dinero en la caja" };
  28.  
  29. _rip = true;
  30. _dinero = 20000 + round(random 10000);
  31. _tienda removeAction _accionion;
  32. _tienda switchMove "AmovPercMstpSsurWnonDnon";
  33. _posibilidad = random(100);
  34. 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; };
  35.  
  36. _policias = (west countSide playableUnits);
  37. if(_policias < 2) exitWith{[[_vault,-1],"disableSerialization;",false,false] spawn life_fnc_MP; hint "No hay suficientes policias para robar";};
  38. disableSerialization;
  39. 5 cutRsc ["life_progress","PLAIN"];
  40. _ui = uiNameSpace getVariable "life_progress";
  41. _progreso = _ui displayCtrl 38201;
  42. _pgText = _ui displayCtrl 38202;
  43. _pgText ctrlSetText format["ROBO EN PROGRESO DEBERÁ ESTAR A MENOS DE 10 METROS (1%1)...","%"];
  44. _progreso progressSetPosition 0.01;
  45. _cP = 0.01;
  46.  
  47. if(_rip) then
  48. {
  49. while{true} do
  50. {
  51. sleep 0.8;
  52. _cP = _cP + 0.01;
  53. _progreso progressSetPosition _cP;
  54. _pgText ctrlSetText format["ROBO EN PROGRESO DEBERÁ ESTAR A MENOS DE 10 METROS (%1%2)...",round(_cP * 100),"%"];
  55. _posicion = position player;
  56. _marcador = createMarker ["Marker200", _posicion];
  57. "Marker200" setMarkerColor "ColorRed";
  58. "Marker200" setMarkerText "ATENCIÓN! ESTAN ROBANDO AQUI!!";
  59. "Marker200" setMarkerType "mil_warning";
  60. if(_cP >= 1) exitWith {};
  61. if(_ladron distance _tienda > 10) exitWith { };
  62. if!(alive _ladron) exitWith {};
  63. };
  64. if!(alive _ladron) exitWith { _rip = false; };
  65. 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; };
  66. 5 cutText ["","PLAIN"];
  67.  
  68. titleText[format["Usted robo %1 euros,Corre antes de que te pille la policía!",[_dinero] call life_fnc_numberText],"PLAIN"];
  69. deleteMarker "Marker200";
  70. life_cash = life_cash + _dinero;
  71.  
  72. _rip = false;
  73. life_use_atm = false;
  74. sleep (60 + random(180));
  75. life_use_atm = true;
  76. if!(alive _ladron) exitWith {};
  77. [[getPlayerUID _ladron,name _ladron,"211"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
  78. };
  79. sleep 300;
  80. _accion = _tienda addAction["Atracar a Santi",life_fnc_robShops];
  81. _tienda switchMove "";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement