M2O Scripting APIScripting reference
    Preparing search index…
    ClassClient API

    Player

    Client handle for a streamed M2O player.

    Hierarchy

    • Player
      • Player
    Index
    • Creates a script wrapper for an existing streamed player with this ID; it does not create or spawn a player.

      Parameters

      • id: number

        Network entity identifier.

      Returns Player

    • Parameters

      • eventName: string
      • OptionalpayloadJson: string

      Returns void

    • Resolves the current world-space transform of one of this player's skeleton bones.

      Parameters

      • boneId: number

        Numeric bone identifier, typically obtained from the global Bone table.

      Returns BoneTransform | null

      The bone transform, or null when the player or requested bone is unavailable.

    • Returns the streamed vehicle currently occupied by this player.

      Returns Vehicle | null

      The current vehicle handle, or null when the player is not inside a streamed vehicle.

    • Parameters

      • Optionalreason: string

      Returns void

    • Parameters

      • world: number

      Returns void

    • Parameters

      • player: Entity | null

      Returns void

    • Returns a readable representation of this player handle.

      Returns string

      The player ID formatted for logging or debugging.

    discordId: string
    hardwareId: string
    id: number
    ip: string
    ping: number
    position: Vector3
    rotation: Vector3 | Quaternion
    steamId: string
    virtualWorld: number