Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Fichier : refuel.sqf
- COPYRIGHT SERVEUR ALTIS LIFE AIEKILLU (http://aiekillu.fr)
- VOUS N'ETES PAS AUTORISE DE LE COPIER OU DE DISTRIBUER LE CONTENUT DE CE FICHIER / DOSSIER SANS L'AUTORISATION DE L'AUTEUR
- PLUS D'INFORMATIONS : https://www.bistudio.com/community/game-content-usage-rules
- Auteur : SnipezZ_Qc
- */
- _object = nearestObject [player, "LandVehicle"];
- _amount = 0.02;
- fuelprice = 2;
- _type = typeOf _object;
- _controll = 0;
- _distance = player distance _object;
- _tags = fuel _object / _amount * fuelprice;
- _get2 = 1- fuel _object;
- _get3 = fuelprice;
- if (life_action_in_use) exitWith {};
- if(vehicle player != player) exitwith {hint "Sortez de votre véhicule pour faire le plein";};
- _object engineOn false;
- {
- _x action ["Eject", vehicle _x];
- } forEach crew _object;
- if (fuel _object >0.96) exitWith {hint "Vous n'avez pas besoin de faire le plein de votre voiture!"};
- titleText ["Réapprovisionnement en essence...", "PLAIN"];
- while {fuel _object < 0.99} do {
- if (life_cash < 500) exitwith { hint "Désolé, vous n'avez pas assez d'argent pour faire le plein de votre voiture"};
- life_cash = life_cash - fuelprice;
- _controll = _controll + 1;
- //// End
- _object setFuel ((fuel _object + _amount) min 1);
- life_action_in_use = true;
- player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
- sleep 0.5;
- };
- _get4 = _controll * fuelprice;
- if (fuel _object > 0.99) then {
- hint format ["Vous avez payé $%1 pour le plein de votre véhicule." , _get4];
- };
- life_action_in_use = false;
- if (life_action_in_use) exitWith {};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement