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

I tried to use the example #37

Closed devmailar closed 2 years ago

devmailar commented 2 years ago

kuva kuva kuva

Taavi-AU commented 2 years ago

do

local mTarget = exports.meta_target

mTarget:addModels(otherinfohere)
devmailar commented 2 years ago

do

local mTarget = exports.meta_target

mTarget:addModels(otherinfohere)

How can I trigger event after clicking icon

BaziForYou commented 2 years ago

one full example for you using lots of option from script you can see how its works

local mTarget = exports["meta_target"]
local PaperStandModels = {
    "prop_news_disp_06a",
    "prop_news_disp_05a",
    "prop_news_disp_01a",
    "prop_news_disp_02a",
    "prop_news_disp_02a_s",
    "prop_news_disp_02c",
    "prop_news_disp_02e",
    "prop_news_disp_03c",
    "prop_news_disp_02b",
    "prop_news_disp_02d",
    "prop_news_disp_03a",
}
mTarget:addModels("NewsStand","News Stand","fas fa-newspaper",PaperStandModels,1.5,
    function(target,option,entity)
        TriggerServerEvent("newspaper:buyNewsPaper")
    end,
    {
        {
            name = "buy_newspaper",
            label = "Buy NewsPaper"
        }
    },
    false,false,
    function(target,pos,ent,endPos,modelHash,isNetworked,netId,targetDist,entityType)
        if not HasEntityBeenDamagedByAnyVehicle(ent) then
            return true
        else
            return false
        end
    end
)