Advertisement
Guest User

Untitled

a guest
Jan 15th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.19 KB | None | 0 0
  1. /*
  2. By Roldan
  3.    ["solicito"] spawn ica_fnc_FarmeoPetroleo;
  4.    ["fianza"] spawn ica_fnc_FarmeoPetroleo;
  5.    ["cargo"] spawn ica_fnc_FarmeoPetroleo;
  6.    ["descargo"] spawn ica_fnc_FarmeoPetroleo;
  7.    ["reset"] spawn ica_fnc_FarmeoPetroleo;
  8. */
  9.  
  10. _param = _this select 0;
  11.  
  12. if (_param isEqualTo "solicito") exitWith {
  13.     if (!license_civ_driver) exitwith {hint "No tienes carnet de conducir B, no puedes conducir este camión!"};
  14.     if (pop_din < 1500) exitwith {hint "La fianza del camión son 1500 €"};
  15.     pop_din = pop_din - 1500;
  16.     _veh = "C_Van_01_fuel_F" createvehicle position player;
  17.     _veh addAction["CARGAR PETROLEO.", {["cargo"] spawn ica_fnc_FarmeoPetroleo}];
  18.     _veh addAction["CARGAR PETROLEO 2.", {["cargo2"] spawn ica_fnc_FarmeoPetroleo}];
  19.     _veh addAction["DESCARGAR PETROLEO.", {["descargo"] spawn ica_fnc_FarmeoPetroleo}];
  20.     _veh setvariable ["cargando",false,true];
  21.     _veh setvariable ["propietario",name player,true];
  22.     _code = '
  23.     if (name player != (vehicle player getvariable "propietario")) then {
  24.         moveout player;
  25.         hint "Solo el dueño puede usar este vehiculo";
  26.         };
  27.     ';
  28.     [_veh, "getIn", _code, true] call ica_fnc_addEH;
  29.     _veh setVariable ["dbInfo",[(getPlayerUID player), 0],true];
  30.     _mat = format["KR-%1-AL", round(random(9999))];
  31.     _veh setVariable ["matricula", _mat, true];
  32.     hint "Todo listo, ve a por petroleo y recarga las gasolineras";
  33. };
  34.  
  35. if (_param isEqualTo "fianza") exitWith {
  36.     if ((count (nearestObjects [player, ["man"], 4]))>1) exitwith {hint "De uno en uno por favor"};
  37.     _veh = nearestObject [player, "C_Van_01_fuel_F"];
  38.     if (isnil "_veh") exitwith {hint "No veo cerca ningún camión"};
  39.     if ((player distance _veh)>10) exitwith {hint "Acerca el camión"};
  40.     _propietario = _veh getvariable "propietario";
  41.     if (name player != _propietario) exitwith {hint "Este camión no esta registrado a tu nombre"};
  42.     deletevehicle _veh;
  43.     pop_din = pop_din + 1500;
  44.     hint "Todo listo, el camión está guardado en el garage municipal, vuelve a por más trabajo cuando quieras";
  45. };
  46.  
  47. if (_param isEqualTo "cargo") exitWith {
  48.     //if ((player distance (getMarkerPos "cajapetroleo")) > 8) exitWith {hint "No estás cerca de la zona de carga"};
  49.     _cantidad = ;
  50.    
  51.     _manguera = ropeCreate [vehicle player, [0,0,0], surtidor, [-0.5,0,(random 0.05)], (distancia - 2)];
  52.     surtidor = cursorObject;
  53.     distancia = nil;
  54.    
  55.     sleep 15;
  56.     deletevehicle _manguera;
  57.    
  58.     hintSilent format ["Cantidad: %1", _cantidad];
  59.    
  60. };
  61.  
  62. if (_param isEqualTo "cargo2") exitWith {
  63.     if ((player distance (getMarkerPos "cajapetroleo")) > 8) exitWith {hint "No estás cerca de la zona de carga"};
  64.     _cantidad = ;
  65.    
  66.     _manguera = ropeCreate [vehicle player, [0,0,0], cajapetroleo, [-0.5,0,(random 0.05)], (distancia - 2)];
  67.     surtidor = cursorObject;
  68.     distancia = nil;
  69.    
  70.     sleep 15;
  71.     deletevehicle _manguera;
  72.    
  73.     hintSilent format ["Cantidad: %1", _cantidad];
  74.    
  75. };
  76.  
  77. if (_param isEqualTo "descargo") exitWith {
  78.     if ((player distance (getMarkerPos "descargopetroleo")) > 8) exitWith {hint "No estás cerca de la zona de descarga"};
  79.     _cantidad = ;
  80.     _dinero = ;
  81.    
  82.     surtidorpt = surtidorpt + _cantidad;
  83.     hintSilent format ["Cantidad: %1\nDinero %2", _cantidad, _dinero];
  84. };
  85.  
  86. if (_param isEqualTo "reset") exitWith {
  87.  
  88. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement