Skip to content

IClientVehicles

Interface · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll

public interface IClientVehicles : IVehicles

Extends: IVehicles

ILocalVehicle? Local { get; }

The local player’s bus, once the authority has accepted it, or null.

Task<bool> DespawnAsync(CancellationToken cancellationToken = default);

Removes the local player’s bus. False when there was none.

Parameters

Returns Task<bool>

Task<ILocalVehicle> SpawnAsync(VehicleSpawnRequest request, CancellationToken cancellationToken = default);

Loads a bus for the local player (replacing the current one) and completes once the authority has accepted it. A map must be loaded. In multiplayer the server must allow the bus.

Parameters

Returns Task<ILocalVehicle>