Skip to content

Commit

Permalink
fix(server/vehicle): vehicle not saving to db if no coords passed (#208
Browse files Browse the repository at this point in the history
…) (#210)
  • Loading branch information
andreutu authored Nov 24, 2024
1 parent 18e8062 commit 87714bf
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion server/vehicle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export async function CreateVehicle(

const entity = coords ? OxVehicle.spawn(data.model, coords as Vector3, heading || 0) : 0;

if (!entity || !DoesEntityExist(entity)) return;
if (!data.vin && (data.owner || data.group)) data.vin = await OxVehicle.generateVin(vehicleData);
if (data.vin && !data.owner && !data.group) delete data.vin;

Expand Down

0 comments on commit 87714bf

Please sign in to comment.