Vehicle::isDoorFullyOpen: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
doors:
__TOC__
*0 = Front Left Door*
 
1 = Front Right Door*
 
2 = Back Left Door*
==Syntax==
3 = Back Right Door
<syntaxhighlight lang="javascript">vehicle.isDoorFullyOpen(doorIndex);</syntaxhighlight>
 
=== Required Arguments ===
*'''doorIndex:''' <font color='red'><b>int</b></font>
 
=== '''Doors'''===
*0 = Front Left Door
*1 = Front Right Door
*2 = Back Left Door
*3 = Back Right Door
*4 = Hood
*4 = Hood
*5 = Trunk
*5 = Trunk
*6 = Trunk2
*6 = Trunk2
==Syntax==
 
<syntaxhighlight lang="javascript">vehicle.isDoorFullyOpen(doorIndex);</syntaxhighlight>
=== Required Arguments ===
*'''doorIndex:''' int
===Return value===
===Return value===
*'''Boolean'''
*'''<font color='green'>Boolean</font>'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript" highlight='4'>
// todo
let vehicle = mp.players.local.vehicle;
 
if (vehicle.isDoorFullyOpen(1)) { // If the Front left door is fully open
vehicle.setDoorShut(1, false); // Close it gently.
}
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 10:37, 7 December 2017


Syntax

vehicle.isDoorFullyOpen(doorIndex);

Required Arguments

  • doorIndex: int

Doors

  • 0 = Front Left Door
  • 1 = Front Right Door
  • 2 = Back Left Door
  • 3 = Back Right Door
  • 4 = Hood
  • 5 = Trunk
  • 6 = Trunk2

Return value

  • Boolean

Example

let vehicle = mp.players.local.vehicle;

if (vehicle.isDoorFullyOpen(1)) { // If the Front left door is fully open
vehicle.setDoorShut(1, false); // Close it gently.
}

See also