feat(server/vehicles): remove vehicles from db

This commit is contained in:
Andyyy7666
2024-03-26 17:08:09 +01:00
parent 2c7aa5723a
commit 2460df2f34

View File

@@ -108,6 +108,15 @@ function NDCore.getVehicle(entity)
DeleteEntity(entity)
end
-- remvoe vehicle from db.
function self.remove(keepEntity)
if not keepEntity and DoesEntityExist(entity) then
DeleteEntity(entity)
end
MySQL.query("DELETE FROM nd_vehicles WHERE id = ?", {self.id})
end
--- set vehicle properties
---@param props table
function self.setProperties(props)