diff --git a/shared/make/makeBlip.lua b/shared/make/makeBlip.lua index fd37024..467d1d8 100644 --- a/shared/make/makeBlip.lua +++ b/shared/make/makeBlip.lua @@ -133,16 +133,19 @@ function makeEntityBlip(data) AddTextComponentString(tostring(data.name)) EndTextCommandSetBlipName(blip) -- Handle preview image if certain resources are running - if isStarted("fs_smallresources") or isStarted("blip-info") or isStarted("blipinfo") then + if isStarted("jim-blipcontroller") then if data.preview then - local txname = string.gsub(tostring(data.name..'preview'), "[ ()~]", "") + local txname = string.gsub(tostring(data.name..'preview'..string.gsub(data.coords.z, "%.", "")), "[ ()~]", "") if data.preview:find("http") or data.preview:find("nui") then createDui(txname, data.preview, vec2(512, 256), scriptTxd) else CreateRuntimeTextureFromImage(scriptTxd, txname, data.preview) end - exports["fs_smallresources"]:SetBlipInfoImage(blip, getScript()..'previewTxd', txname) - exports["fs_smallresources"]:SetBlipInfoTitle(blip, data.name, false) + exports["jim-blipcontroller"]:ShowBlipInfo(blip, { + title = data.name, + dict = getScript()..'scriptTxd', + tex = txname, + }) end end end