#CW-Crafting Image
1 messages · Page 1 of 1 (latest)
You'll also need to learn how to work with node projects and doing builds. good luck 👋
Its weird, but before the update, it was working fine. I didnt have to change anything.... what is different with the new update?
if (store.settings.useLocalImages) {
return `nui://cw-crafting/images/${key}.png`;
} else {
if (store.settings.oxInventory) {
return `nui://ox_inventory/web/images/${key}.png`;
} else {
return `nui://qb-inventory/html/images/${key}`;
}
}
};```
I changed this to the url, doesn't work lol.
tried nui://core_inventory/html/img/${key}.png
and also nui://core_inventory/html/img/${key}
export const getImageLink = (
material: string | undefined,
toMaterialsNameMap: Record<string, string>,
metadata: any
) => {
const store = useGlobalStore();
let key = undefined;
if (metadata?.image) {
key = metadata.image
} else {
if (!material) {
key = Object.keys(toMaterialsNameMap)[0];
} else {
key = material;
}
}
if (store.settings.useLocalImages) {
return `nui://cw-crafting/images/${key}.png`;
} else {
if (store.settings.oxInventory) {
return `nui://ox_inventory/web/images/${key}.png`;
} else {
return `nui://core_inventory/html/img/${key}`;
}
}
};
The version that was working is version '2.0'
Nothing has changed in this file for 9 months
Did you change, and also make a new build? of the html code?
The code is the same. If you want I can send you what I had before lol. Not sure if something changed but it doesn’t matter what I do to the “getImageLink.ts” file. It doesn’t change anything. I’ve even tried to replace my url in each of the existing urls.