meta-hub / meta_target

A complete third eye solution for FiveM and RedM, aiming to proving all solutions from fivem-target, bt-target and qtarget under one resource.
21 stars 15 forks source link

addModels #21

Closed Taavi-AU closed 2 years ago

Taavi-AU commented 2 years ago

Cant seem to use addModels on latest version, just doesnt seem to like models

image

meta-hub commented 2 years ago

How are you calling the function? The readme is likely outdated by now.

Taavi-AU commented 2 years ago
local models = {
    "prop_cs_dumpster_01a",
    "p_dumpster_t",
    "prop_snow_dumpster_01",
    "prop_dumpster_01a",
    "prop_dumpster_02a",
    "prop_dumpster_02b",
    "prop_dumpster_3a",
    "prop_dumpster_4a",
    "prop_dumpster_4b",
}

exports["meta_target"]:addModels({
    id = "dumpsters",
    title = "Dumpster",
    icon = "fas fa-dumpster",
    models = models,
    radius = 2,
    onSelect = onModFreakzsBumhole,
    items = {
        {
            name = "search_dumpster",
            label = "Search Dumpster"
        }
    }
})
meta-hub commented 2 years ago

Argument evaluation was removed, no reason to pass a table since the compatibility files allow correct arguments are passed for provided resources. Call addModel(id,title,icon,model,radius,onSelect,items,vars,res) instead.