From ae0178717ce0670bcd1abad5f1eccb94553155cb Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Wed, 15 Feb 2023 03:18:04 -0600 Subject: [PATCH] Function to remove vehicles --- scripts/client/vehicle.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/client/vehicle.js b/scripts/client/vehicle.js index 010398f7..5d185e08 100644 --- a/scripts/client/vehicle.js +++ b/scripts/client/vehicle.js @@ -163,4 +163,12 @@ function getVehicleSpeed(vehicle) { return speed; } +// =========================================================================== + +function removeVehiclesFromClient() { + // Need to destroy elements before clearing array + + getServerData().vehicles.splice(0); +} + // =========================================================================== \ No newline at end of file