IClientVehicles
Interface · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll
public interface IClientVehicles : IVehiclesExtends: IVehicles
Properties
Section titled “Properties”ILocalVehicle? Local { get; }The local player’s bus, once the authority has accepted it, or null.
Methods
Section titled “Methods”DespawnAsync
Section titled “DespawnAsync”Task<bool> DespawnAsync(CancellationToken cancellationToken = default);Removes the local player’s bus. False when there was none.
Parameters
cancellationTokenCancellationToken
Returns Task<bool>
SpawnAsync
Section titled “SpawnAsync”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
requestVehicleSpawnRequestcancellationTokenCancellationToken
Returns Task<ILocalVehicle>
