Closed devmailar closed 2 years ago
do
local mTarget = exports.meta_target
mTarget:addModels(otherinfohere)
do
local mTarget = exports.meta_target mTarget:addModels(otherinfohere)
How can I trigger event after clicking icon
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
)