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



Introduced in

Version:2.00

Description

Description:

Locks one or all cargo positions in a vehicle.

A locked position cannot be entered by either the player or an AI unit (even if it is empty). A locked seat can be left, but not reoccupied.

Syntax

Syntax:vehicle lockCargo lock
Parameters:
  • vehicle: Object - Vehicle whose cargo position to lock / unlock.
  • lock: Boolean - If true, then all the cargo positions are locked, false otherwise.
Return Value:Nothing

Alternative Syntax

Syntax:vehicle lockCargo [index, lock]
Parameters:
  • vehicle: Object - Vehicle whose cargo position to lock / unlock.
  • index: Number - Index of cargo position to lock / unlock.
  • lock: Boolean - If true, then the specified cargo position is locked, false otherwise.
Return Value:Nothing

Examples

Examples:jeep1 lockCargo truejeep1 lockCargo [1, false]

Additional Information

See also: lockedCargo, lockDriver, lockTurret, lock
Multiplayer: 
Problems: 

Notes