M2O Scripting APIScripting reference
    Preparing search index…
    ClassClient API

    Vehicle

    Client handle for a streamed M2O vehicle.

    Hierarchy

    • Entity
      • Vehicle
    Index
    • Creates a script wrapper for an existing streamed vehicle with this ID; it does not spawn a vehicle.

      Parameters

      • id: number

        Network entity identifier.

      Returns Vehicle

    • Resolves the current world-space transform of a named vehicle part.

      Parameters

      • partId: number

        Numeric part identifier, typically obtained from the global VehiclePart table.

      Returns BoneTransform | null

      The part transform, or null when the vehicle or requested part is unavailable.

    • Parameters

      • world: number

      Returns void

    • Parameters

      • player: Entity | null

      Returns void

    • Returns a readable representation of this vehicle handle.

      Returns string

      The vehicle ID formatted for logging or debugging.

    id: number
    position: Vector3
    rotation: Vector3 | Quaternion
    virtualWorld: number