Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- By Roldan
- ["solicito"] spawn ica_fnc_FarmeoPetroleo;
- ["fianza"] spawn ica_fnc_FarmeoPetroleo;
- ["cargo"] spawn ica_fnc_FarmeoPetroleo;
- ["descargo"] spawn ica_fnc_FarmeoPetroleo;
- ["reset"] spawn ica_fnc_FarmeoPetroleo;
- */
- _param = _this select 0;
- if (_param isEqualTo "solicito") exitWith {
- if (!license_civ_driver) exitwith {hint "No tienes carnet de conducir B, no puedes conducir este camión!"};
- if (pop_din < 1500) exitwith {hint "La fianza del camión son 1500 €"};
- pop_din = pop_din - 1500;
- _veh = "C_Van_01_fuel_F" createvehicle position player;
- _veh addAction["CARGAR PETROLEO.", {["cargo"] spawn ica_fnc_FarmeoPetroleo}];
- _veh addAction["CARGAR PETROLEO 2.", {["cargo2"] spawn ica_fnc_FarmeoPetroleo}];
- _veh addAction["DESCARGAR PETROLEO.", {["descargo"] spawn ica_fnc_FarmeoPetroleo}];
- _veh setvariable ["cargando",false,true];
- _veh setvariable ["propietario",name player,true];
- _code = '
- if (name player != (vehicle player getvariable "propietario")) then {
- moveout player;
- hint "Solo el dueño puede usar este vehiculo";
- };
- ';
- [_veh, "getIn", _code, true] call ica_fnc_addEH;
- _veh setVariable ["dbInfo",[(getPlayerUID player), 0],true];
- _mat = format["KR-%1-AL", round(random(9999))];
- _veh setVariable ["matricula", _mat, true];
- hint "Todo listo, ve a por petroleo y recarga las gasolineras";
- };
- if (_param isEqualTo "fianza") exitWith {
- if ((count (nearestObjects [player, ["man"], 4]))>1) exitwith {hint "De uno en uno por favor"};
- _veh = nearestObject [player, "C_Van_01_fuel_F"];
- if (isnil "_veh") exitwith {hint "No veo cerca ningún camión"};
- if ((player distance _veh)>10) exitwith {hint "Acerca el camión"};
- _propietario = _veh getvariable "propietario";
- if (name player != _propietario) exitwith {hint "Este camión no esta registrado a tu nombre"};
- deletevehicle _veh;
- pop_din = pop_din + 1500;
- hint "Todo listo, el camión está guardado en el garage municipal, vuelve a por más trabajo cuando quieras";
- };
- if (_param isEqualTo "cargo") exitWith {
- //if ((player distance (getMarkerPos "cajapetroleo")) > 8) exitWith {hint "No estás cerca de la zona de carga"};
- _cantidad = ;
- _manguera = ropeCreate [vehicle player, [0,0,0], surtidor, [-0.5,0,(random 0.05)], (distancia - 2)];
- surtidor = cursorObject;
- distancia = nil;
- sleep 15;
- deletevehicle _manguera;
- hintSilent format ["Cantidad: %1", _cantidad];
- };
- if (_param isEqualTo "cargo2") exitWith {
- if ((player distance (getMarkerPos "cajapetroleo")) > 8) exitWith {hint "No estás cerca de la zona de carga"};
- _cantidad = ;
- _manguera = ropeCreate [vehicle player, [0,0,0], cajapetroleo, [-0.5,0,(random 0.05)], (distancia - 2)];
- surtidor = cursorObject;
- distancia = nil;
- sleep 15;
- deletevehicle _manguera;
- hintSilent format ["Cantidad: %1", _cantidad];
- };
- if (_param isEqualTo "descargo") exitWith {
- if ((player distance (getMarkerPos "descargopetroleo")) > 8) exitWith {hint "No estás cerca de la zona de descarga"};
- _cantidad = ;
- _dinero = ;
- surtidorpt = surtidorpt + _cantidad;
- hintSilent format ["Cantidad: %1\nDinero %2", _cantidad, _dinero];
- };
- if (_param isEqualTo "reset") exitWith {
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement