M2O Scripting APIScripting reference
    Preparing search index…
    ClassServer API

    Prop

    Replicated static world object created from a Mafia II model.

    Hierarchy

    • Entity
      • Prop
    Index
    • Creates a script wrapper for an existing prop with this ID; use Prop.create() to create a prop.

      Parameters

      • id: number

        Network entity identifier.

      Returns Prop

    • Parameters

      • world: number

      Returns void

    • Parameters

      • player: Entity | null

      Returns void

    • Returns a readable representation of this prop.

      Returns string

      The prop ID formatted for logging or debugging.

    • Creates and replicates a static world prop.

      Parameters

      • x: number

        Initial world-space X coordinate.

      • y: number

        Initial world-space Y coordinate.

      • z: number

        Initial world-space Z coordinate.

      • model: number

        Mafia II model identifier to instantiate.

      • Optionalrotation: Vector3 | Quaternion

        Optional orientation: a Quaternion, or a Vector3 of Euler angles in radians.

      • OptionalvirtualWorld: number

        Optional virtual-world ID used for visibility filtering.

      Returns Prop

      The newly created prop handle.

    id: number
    model: number

    Mafia II model identifier used by this prop.

    position: Vector3
    rotation: Vector3 | Quaternion
    virtualWorld: number