Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- por: quickskill
- el objetivo es que tardes unos 20 minutos moviendote de punto en punto
- this addAction["Solicitar trabajo en Fumigaciones Gato Volador", { ["solicito"] spawn QUICK_fnc_fumigador;}];
- this addAction["Devolver avioneta a Fumigaciones Gato Volador", { ["fianza"] spawn QUICK_fnc_fumigador;}];
- this addAction["Cobrar paga de fumigador", { ["cobrarTrabajo"] spawn QUICK_fnc_fumigador;}];
- */
- _param = _this select 0;
- _veh = _this select 1;
- if (_param isEqualTo "trabajo") exitWith {
- if ((player getvariable "trabajo_fumigador_activo") > 0) exitwith {};
- //empieza a trabajar
- player setvariable ["trabajo_fumigador_activo",1,true];
- //vars
- _time = 60 * 35;
- _ruta_random = round (random 4);
- _veh = nearestObject [player, "C_Plane_Civil_01_F"];
- _finTrayecto = 0;
- _zonaFumigar = "Fournos";
- _solo1Vez=0;
- if(_ruta_random == 0) then {
- _zonaFumigar = "Fournos";
- };
- if(_ruta_random == 1) then {
- _zonaFumigar = "Oreokastro";
- };
- if(_ruta_random == 2) then {
- _zonaFumigar = "Sideras";
- };
- if(_ruta_random == 3) then {
- _zonaFumigar = "Dorida";
- };
- if(_ruta_random == 4) then {
- _zonaFumigar = "Eginio";
- };
- _posDestino = getMarkerPos _zonaFumigar;
- //creamos flecha
- _flechaDir = "Sign_Arrow_Direction_F" createVehicleLocal (position _veh);
- _flechaDir attachTo [_veh, [0,0,1]];
- _fromTo = ((position _veh ) vectorFromTo _posDestino);
- _flechaDir setDir ((_fromTo select 0) atan2 (_fromTo select 1)) - (getDir _veh);
- sleep 1;
- hint "Todo listo, ve a fumigar los campos y seras recompensado";
- sleep 1;
- //loop cuenta atras
- while {_time > 0} do {
- //distancia
- _metros = _veh distance _posDestino;
- //actu flecha
- _fromTo = ((position _veh ) vectorFromTo _posDestino);
- _flechaDir setDir ((_fromTo select 0) atan2 (_fromTo select 1)) - (getDir _veh);
- //tiempo
- sleep 1;
- _time = _time - 1;
- hintSilent format["Destino: %3 \n Tiempo : %1 \n Distancia: %2m ", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring,round (_metros), _zonaFumigar];
- /// si muere paramos el contador
- if !(alive player) then { _time = 0; };
- //empezamos a fumigar
- if(_metros < 1200 )then{
- if(_solo1Vez==0)then{
- _humo = "SmokeShellYellow" createVehicle position _veh;
- _humo attachTo [_veh, [-1, -0.8, 0] ];
- _solo1Vez=1;
- }
- };
- // el tio se toca los huevos pues no cobras
- if (_time <= 0 ) then {
- hint "Que tio mas lento, no te pagaremos nada por tu trabajo, vuelve a empezar la ruta holgazan";
- player setvariable ["trabajo_fumigador_activo",0,true];
- _time = 0;
- };
- //llegamos al destino
- if(_metros < 500 )then{
- hint "Buen trabajo ya puedes ir a cobrar.";
- //ha llegado a su destino final ya puede cobrar
- player setvariable ["pagar_fumigador",1,true];
- _time = 0;
- };
- };//end while
- };
- if (_param isEqualTo "cobrarTrabajo") exitWith {
- if ((count (nearestObjects [player, ["man"], 10]))>1) exitwith {hint "De uno en uno por favor"};
- if ((player getvariable "pagar_fumigador") == 0) exitwith {hint "Trabaja primero, que te crees que eres politico?¿?"};
- if ((player getvariable "pagar_fumigador") > 0) exitwith {
- hint "Fantástico, has trabajado duro, aqui tienes tu recompensa.";
- //quick skill
- _pago = 120000;
- //pagamos
- life_cash = life_cash + _pago;
- player setvariable ["pagar_fumigador",0,true];
- player setvariable ["trabajo_fumigador_activo",0,true];
- };
- };
- if (_param isEqualTo "solicito") exitWith {
- if ((count (nearestObjects [player, ["man"], 10]))>1) exitwith {hint "De uno en uno por favor"};
- if (life_cash < 200000) exitwith {hint "La fianza de la avioneta son 200000 €"};
- life_cash = life_cash - 200000;
- _veh = "C_Plane_Civil_01_F" createvehicle getMarkerPos "avioneta_fumigador";
- player setvariable ["pagar_fumigador",0,true];
- _veh setvariable ["propietario",name player,true];
- player moveInDriver _veh;
- //add actions
- _veh addAction["Empezar trabajo para Fumigaciones Gato Volador.", {["trabajo"] spawn QUICK_fnc_fumigador}];
- // player setvariable ["uniforme",uniform player,true];
- player addHeadgear "H_PilotHelmetHeli_O";
- player forceAddUniform "U_I_pilotCoveralls";
- };
- if (_param isEqualTo "fianza") exitWith {
- if ((count (nearestObjects [player, ["man"], 10]))>1) exitwith {hint "De uno en uno por favor"};
- _veh = nearestObject [player, "C_Plane_Civil_01_F"];
- if (isnil "_veh") exitwith {hint "No veo cerca ningúna avioneta"};
- if ((player distance _veh)>10) exitwith {hint "Acerca la avioneta"};
- _propietario = _veh getvariable "propietario";
- if (name player != _propietario) exitwith {hint "Esta avioneta no esta registrada a tu nombre"};
- deletevehicle _veh;
- //_uniforme = player getvariable "uniforme";
- //player adduniform _uniforme;
- removeHeadgear player;
- life_cash = life_cash + 200000;
- deleteVehicle _flechaDir;
- hint "Todo listo, avioneta guardado en el hangar, vuelve a por más trabajo cuando quieras";
- player setvariable ["trabajo_fumigador_activo",0,true];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement