Vehicle::isDoorFullyOpen: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
 
Line 20: Line 20:
*'''<font color='green'>Boolean</font>'''
*'''<font color='green'>Boolean</font>'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript" highlight='4'>
let vehicle = mp.players.local.vehicle;
let vehicle = mp.players.local.vehicle;


Line 27: Line 27:
}
}
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

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