Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.24

Description

Description:Lock vehicle (disable mounting / dismounting) for AI and / or player.

Syntax

Syntax:vehicle lock lock
Parameters:
  • vehicle: Object - Vehicle that should be locked / unlocked.
  • lock: Boolean - If true, then vehicle is locked, if false it is unlocked.
Return Value:Nothing

Alternative Syntax

Syntax:vehicle lock [lockForPlayer, lockForAll]
Parameters:
  • vehicle: Object - Vehicle that should be locked / unlocked.
  • lockForPlayer: Boolean - Determines if the vehicle be locked for the player (true - yes, false - no).
  • lockForAll: Boolean - Determines if the vehicle should be locked for all the units, including the player. If set to true, then lockForPlayer has no effect and no units can get in or out.
Return Value:Nothing

Examples

Examples:
jeep1 lock true
jeep1 lock [true, false]

Additional Information

See also: Nothing
Multiplayer: 
Problems: 

Notes





The old syntax doesn't work correctly on AI whose groups change, before they try and complete an order to board a locked vehicle. Where possible try and use the new syntax to avoid this issue.