Difference between revisions of "fuel"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
m (template:command argument fix)
Line 9: Line 9:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Checks how much fuel is left in the gas tank of a vehicle. |= Description
+
| Checks how much fuel is left in the gas tank of a vehicle. |DESCRIPTION=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| '''fuel''' vehicle |= Syntax
+
| '''fuel''' vehicle |SYNTAX=
  
|p1= vehicle: [[Object]] |= Parameter 1
+
|p1= vehicle: [[Object]] |PARAMETER1=
  
 
| [[Number]] -   
 
| [[Number]] -   
The returned number is in range 0 (empty tank) to 1 (full tank). |= Return value
+
The returned number is in range 0 (empty tank) to 1 (full tank). |RETURNVALUE=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
   
 
   
|x1= <code>[[if]] ([[fuel]] [[vehicle]] [[player]] == 0) [[then]] {[[hint]] "The vehicle is out of fuel!"};</code> |= Example 1
+
|x1= <code>[[if]] ([[fuel]] [[vehicle]] [[player]] == 0) [[then]] {[[hint]] "The vehicle is out of fuel!"};</code> |EXAMPLE1=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [[setFuel]], [[setFuelCargo]], [[getFuelCargo]] |= See also
+
| [[setFuel]], [[setFuelCargo]], [[getFuelCargo]] |SEEALSO=
  
 
}}
 
}}

Revision as of 14:39, 7 April 2019

Introduced with Operation Flashpoint version 1.00
  Arguments of this scripting command don't have to be local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Checks how much fuel is left in the gas tank of a vehicle.

Syntax

Syntax:
fuel vehicle
Parameters:
vehicle: Object
Return Value:
Number - The returned number is in range 0 (empty tank) to 1 (full tank).

Examples

Example 1:
if (fuel vehicle player == 0) then {hint "The vehicle is out of fuel!"};

Additional Information

Multiplayer:
-
See also:
setFuelsetFuelCargogetFuelCargo

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

UNN
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. They return a value greater than 0.98 and less than 1.

Bottom Section