Skip to content
Browse files
Verify that there's actually a vehicle for /v respawn
  • Loading branch information
RussellLVP committed Jul 2, 2020
1 parent ca9bc28 commit d773a65ae1f209be63b049a4e31f81b973d5ff3e
Showing 2 changed files with 5 additions and 0 deletions.
@@ -549,6 +549,7 @@
"VEHICLE_QUICK_COLLECTABLES": "@error Keep tagging Spray Tags and shooting Red Barrels to enable this command!",
"VEHICLE_RESET": "@success The vehicle layout has been reset.",
"VEHICLE_RESPAWNED": "@success The %s has been respawned.",
"VEHICLE_RESPAWN_NOT_IN_VEHICLE": "@error %s is not in a vehicle, which can thus not be respawned.",
"VEHICLE_SAVE_TOO_BUSY": "@error Sorry, this area is too busy! There already are %d vehicles (max: %d) and %d models (max: %d).",
"VEHICLE_SAVED": "@success The %s has been %s in the database.",
"VEHICLE_SEIZE_DRIVER": "@error %s is already driving your vehicle!",
@@ -379,6 +379,10 @@ class VehicleCommands {
// wish to reset the vehicle's position to its original spot.
onVehicleRespawnCommand(player, subject) {
const vehicle = subject.vehicle;
if (!vehicle) {

// Bail out if the |subject| is not driving a vehicle, or it's not managed by this system.
if (!this.manager_.isManagedVehicle(vehicle)) {

0 comments on commit d773a65

Please sign in to comment.