30 lines
		
	
	
	
		
			550 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			550 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
 | 
						|
local Ox = GetResourceState("ox_core") == "started" and exports["ox_core"] or nil
 | 
						|
 | 
						|
function IsOwnedVehicle(plate, vehicle)
 | 
						|
	if (Ox) then
 | 
						|
		return Ox:GetVehicle(vehicle)
 | 
						|
	end
 | 
						|
 | 
						|
	local results = Storage.IsVehicleOwned({ plate, Trim(plate) })
 | 
						|
 | 
						|
	if (not results) then
 | 
						|
		return false
 | 
						|
	end
 | 
						|
 | 
						|
	return #results > 0
 | 
						|
end
 | 
						|
 | 
						|
function StoreVehicle(plate, vehicle)
 | 
						|
	if (Ox) then
 | 
						|
		if (vehicle) then
 | 
						|
			local oxVeh = Ox:GetVehicle(vehicle)
 | 
						|
			if (oxVeh) then
 | 
						|
				oxVeh.setStored()
 | 
						|
			end
 | 
						|
		end
 | 
						|
		return
 | 
						|
	end
 | 
						|
 | 
						|
	Storage.StoreVehicleInGarage({ plate, Trim(plate) })
 | 
						|
end
 |