mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Server Done I Think
This commit is contained in:
18
SQF/dayz_server/compile/fa_fuelConsumption.sqf
Normal file
18
SQF/dayz_server/compile/fa_fuelConsumption.sqf
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Not Used Test System
|
||||
*/
|
||||
|
||||
|
||||
//_vehicle = _this select 0;
|
||||
//_engineState = _this select 1;
|
||||
|
||||
_rate = getNumber (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> "fuelconsumptionrate");
|
||||
|
||||
if (_this select 1) then {
|
||||
//[_vehicle, _rate] spawn {
|
||||
while {isEngineOn (_this select 0)} do {
|
||||
(_this select 0) setFuel ( Fuel (_this select 0) - (_this select 1));
|
||||
sleep 1;
|
||||
};
|
||||
//};
|
||||
};
|
||||
Reference in New Issue
Block a user