Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. /*
  2.  
  3. Fichier : refuel.sqf
  4.  
  5. COPYRIGHT SERVEUR ALTIS LIFE AIEKILLU (http://aiekillu.fr)
  6. VOUS N'ETES PAS AUTORISE DE LE COPIER OU DE DISTRIBUER LE CONTENUT DE CE FICHIER / DOSSIER SANS L'AUTORISATION DE L'AUTEUR
  7. PLUS D'INFORMATIONS : https://www.bistudio.com/community/game-content-usage-rules
  8.  
  9. Auteur : SnipezZ_Qc
  10. */
  11.  
  12. _object = nearestObject [player, "LandVehicle"];
  13. _amount = 0.02;
  14. fuelprice = 2;
  15. _type = typeOf _object;
  16. _controll = 0;
  17. _distance = player distance _object;
  18.  
  19. _tags = fuel _object / _amount * fuelprice;
  20. _get2 = 1- fuel _object;
  21. _get3 = fuelprice;
  22. if (life_action_in_use) exitWith {};
  23. if(vehicle player != player) exitwith {hint "Sortez de votre véhicule pour faire le plein";};
  24.  
  25. _object engineOn false;
  26. {
  27. _x action ["Eject", vehicle _x];
  28. } forEach crew _object;
  29.  
  30. if (fuel _object >0.96) exitWith {hint "Vous n'avez pas besoin de faire le plein de votre voiture!"};
  31.  
  32. titleText ["Réapprovisionnement en essence...", "PLAIN"];
  33.  
  34. while {fuel _object < 0.99} do {
  35.  
  36. if (life_cash < 500) exitwith { hint "Désolé, vous n'avez pas assez d'argent pour faire le plein de votre voiture"};
  37. life_cash = life_cash - fuelprice;
  38. _controll = _controll + 1;
  39. //// End
  40. _object setFuel ((fuel _object + _amount) min 1);
  41. life_action_in_use = true;
  42. player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
  43.  
  44. sleep 0.5;
  45. };
  46.  
  47. _get4 = _controll * fuelprice;
  48. if (fuel _object > 0.99) then {
  49. hint format ["Vous avez payé $%1 pour le plein de votre véhicule." , _get4];
  50. };
  51.  
  52. life_action_in_use = false;
  53. if (life_action_in_use) exitWith {};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement