fuel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
[[Category:Scripting Commands|FUEL]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|FUEL]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|FUEL]]
[[Category:Scripting Commands ArmA|FUEL]]


| ofp |= Game name


<h2 style="color:#000066">'''fuel ''vehicle'''''</h2>
|1.00|= Game version


|arg= global |= Arguments in MP
____________________________________________________________________________________________


'''Operand types:'''
| Checks how much fuel is left in the gas tank of a vehicle. |= Description
____________________________________________________________________________________________


'''vehicle:''' [[Object]]
| '''fuel''' vehicle |= Syntax


'''Type of returned value:'''
|p1= vehicle: [[Object]] |= Parameter 1


[[Number]]
| [[Number]]
The returned number is in range 0 (empty tank) to 1 (full tank). |= Return value
____________________________________________________________________________________________
 
|x1= <pre>? (fuel (vehicle player) == 0) : hint "The vehicle is out of fuel!"</pre> |= Example 1
____________________________________________________________________________________________


'''Description:'''
| [[setFuel]] |= See also


Check how much '''fuel''' the '''vehicle''' has left in the gas tank, in range 0 to 1.
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Example:'''
<!-- Note Section END -->
</dl>


? ('''fuel''' ([[vehicle]] [[player]]) <25) : [[hint]] "Fuel is running low"
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|FUEL]]
[[Category:Scripting Commands OFP 1.96|FUEL]]
[[Category:Scripting Commands OFP 1.46|FUEL]]
[[Category:Scripting Commands ArmA|FUEL]]

Revision as of 00:19, 2 August 2006

Hover & click on the images for description

Description

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

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:
? (fuel (vehicle player) == 0) : hint "The vehicle is out of fuel!"

Additional Information

See also:
setFuel

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section