// Ищем VehicleAction, после switch (action) { ставим
case "spawnCar":
bool checkAutoInGarage = garage.IsGarageToNumber(vehicleData.SqlId);
if (checkAutoInGarage)
{
if (number != null)
{
Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"Ваша машина будет доставлена в течении 10-ти секунд", 3000);
NAPI.Task.Run(() => {
garage.SpawnCarAtPosition(number, player.Position.Add(new Vector3(0, 1.5f, 0)), player.Rotation);
}, delayTime: 10000);
}
}
else
{
Notify.Send(player, NotifyType.Error, NotifyPosition.BottomCenter, "Эта машина не стоит в гараже", 3000);
return;
}
break;