swkeep / keep-companion

Qbcore pet system
GNU General Public License v3.0
137 stars 57 forks source link

im getting an error with the water #57

Open ybservices23 opened 1 year ago

ybservices23 commented 1 year ago

image

im not to sure what it is

swkeep commented 1 year ago
        [6] = {
            name = "sandwich",
            price = 2,
            amount = 50,
            type = "item",
            slot = 6,
        },

Let's assume this is the water bottle in the shop script ensure it has info = {} when players get it

        [6] = {
            name = "sandwich",
            price = 2,
            amount = 50,
            info = {},
            type = "item",
            slot = 6,
        },
ybservices23 commented 1 year ago

Okay make sense Only small issue im having is, if you have no water and you use the eye system to give water, it gives no error or info about you having no water bottles if that makes sense

swkeep commented 1 year ago

Yes, I didn't add because they can see it on item

https://github.com/swkeep/keep-companion#step-4-tooltip

else if (itemData.name == "petwaterbottleportable") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html("<p>capacity(L): " + itemData.info.liter + "</p>");
}