Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.58 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 < _get4) exitwith
  37.     {
  38.         hint "Désolé, vous n'avez pas assez d'argent pour faire le plein de votre voiture"
  39.     };
  40.  
  41.     life_cash = life_cash - fuelprice;
  42.     _controll = _controll + 1;
  43.     //// End
  44.     _object setFuel ((fuel _object + _amount) min 1);
  45.     life_action_in_use = true;
  46.     player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
  47.  
  48.     sleep 0.5;
  49. };
  50.  
  51. _get4 = _controll * fuelprice;
  52. if (fuel _object > 0.99) then {
  53. hint format ["Vous avez payé $%1 pour le plein de votre véhicule." , _get4];
  54. };
  55.  
  56. life_action_in_use = false;
  57. if (life_action_in_use) exitWith {};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement