zapatahacks

Untitled

Sep 16th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. /*
  2. File: fn_gasolineraPro.sqf
  3. Author: life
  4.  
  5. */
  6.  
  7. _param = _this select 0;
  8.  
  9. if (_param == "solicitarGas") then
  10. {
  11. _boquilla = "pop_tiburon" createVehicle position player;
  12. _boquilla attachTo [player, [-0.1, 0.1, 0.15], "RightHand"];
  13. player addAction ["Poner gasolina",' ["ponerGas"] spawn life_fnc_gasolineraPro;', "", 9,false,true,"",""];
  14.  
  15. };
  16.  
  17. if (_param == "ponerGas") then {
  18.  
  19. _objeto = cursorObject;
  20. if(player distance _objeto > 2) exitWith {hint "Te has alejado";};
  21.  
  22. if(_objeto isKindOF "LandVehicle") then {
  23.  
  24.  
  25. deleteVehicle _boquilla;
  26. _boquilla = "pop_tiburon" createVehicle position player;
  27. _boquilla attachTo _objeto;
  28.  
  29. _gasolina = fuel _objeto;
  30. _gasolinaxcien = _gasolina * 100;
  31. _dinero = _gasolinapuesta;
  32. hint format ["Usted tiene un %1% de gasolina\n Le va a costar: %2", _gasolinaxcien, _dinero]
  33.  
  34. player addAction ["Cojer boquilla",' ["cojer"] spawn life_fnc_gasolineraPro;', "", 9,false,true,"",""];
  35. }else{
  36. hint "Debes apuntar al coche para ponerle gasolina. El aire corre solo";
  37. };
  38. };
  39.  
  40. if (_param == "cojer") then{
  41. deleteVehicle _boquilla;
  42. _boquilla = "pop_tiburon" createVehicle position player;
  43. player addAction ["Devolver boquilla",' ["devolver"] spawn life_fnc_gasolineraPro;', "", 9,false,true,"",""];
  44. };
  45.  
  46. if (_param == "devolver") then{
  47. deleteVehicle _boquilla;
  48. };
Advertisement
Add Comment
Please, Sign In to add comment