Skip to content

NPC_PutInVehicle does not visually attach NPC to boat seat #1225

Closed

Description

@ManmyDev

NPC_PutInVehicle updates logical state correctly:

  • NPC_GetVehicle returns returns the correct boat ID
  • NPC_GetVehicleSeat returns driver

However, the NPC model remains visually on foot and does not attach to the boat seat.

For testing, I manually positioned the NPC on top of the boat using NPC_SetPos, then called NPC_PutInVehicle through a custom command while standing near the boat. After calling it, the NPC briefly disappears and reappears, but still remains visually on foot instead of attaching to the boat seat.

I also tested calling NPC_PutInVehicle automatically after spawn, and the result is the same.

Client used:

  • SA-MP 0.3.7 R1 client

Tested boat models:

  • 595 (Launch)
  • 446 (Squalo)

Tested:

  • localhost and VPS
  • multiple boat models
  • skin set before calling NPC_PutInVehicle
  • delayed call after spawn

Activity

  1. added
    bug
    on May 13, 2026
  2. Revelts commented on Jun 28, 2026

    @Revelts
    Contributor

    Opened #1236 with a fix.

    Root cause: Vehicle::putPlayer sends PutPlayerInVehicle only to the entering player, which is a no-op for an NPC (no real client). Other streamed clients only see DriverSync packets afterwards, and the SA-MP client refuses to attach a remote player to boats from DriverSync alone while the local view shows them on foot. The natural goToVehicle path does not hit this because it broadcasts EnterVehicle first.

    Fix mirrors the natural entry path: broadcast EnterVehicle to streamed players inside NPC::putInVehicle after Vehicle::putPlayer.

  3. added a commit that references this issue on Oct 8, 2026
    d59fbe0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions