{"name":"fuel","operator":null,"title":"fuel","type":"command","url":"https://community.bistudio.com/wiki/fuel","revid":376958,"updated":"2026-01-01T05:49:41Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Checks how much fuel is left in the gas tank of a vehicle.","syntaxes":[{"syntax":"fuel vehicle","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"}],"returns":{"type":"Number in range 0..1","types":["Number"],"description":"0 (empty tank) to 1 (full tank).","text":"Number in range 0..1 - 0 (empty tank) to 1 (full tank)."},"form":"unary","operator":null,"left":null,"right":{"text":"vehicle","types":["Object"]}}],"examples":[{"text":"```sqf\nif (fuel vehicle player == 0) then { hint \"The vehicle is out of fuel!\" };\n```","code":["if (fuel vehicle player == 0) then { hint \"The vehicle is out of fuel!\" };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setFuel","setFuelCargo","getFuelCargo"],"notes":[{"user":"UNN","date":"2006-08-13T12:36:00Z","text":"Vehicles refuelled in game with the Fuel trucks e.t.c never get completely refuelled. After refuelling, rather than returning a value of 1 when the fuel command is called.\nThey return a value greater than 0.98 and less than 1."},{"user":"fusselwurm","date":"2020-12-19T19:10:00Z","text":"returns\n- *1* for units (dead or alive)\n- *0* for *objNull*"}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}