Closed ElusionPDX closed 3 years ago
They simply don't function the same.
Issue is we have scripts that are locked that we cant switch to your edited bt target. Having two eye systems is kinda dum for us to do.
On Mon, Jun 14, 2021, 1:07 PM meta-hub @.***> wrote:
They simply don't function the same.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/meta-hub/fivem-target/issues/4#issuecomment-860845412, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETP5HMPFX3EMV3OBBABNFLTSYZLZANCNFSM46GGGA6A .
Request access to edit the script or request that the script author provides fivem-target support.
well trying to update stuff to it and its just crashing clients. Am i just calling your function wrong ?
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
exports["fivem-target"]:AddTargetModel({
name = "pickrocks",
label = "Mine rocks",
icon = "fas fa-dog",
model = GetHashKey('prop_rock_3_f'),
interactDist = 1.2,
onInteract = onInteract,
options = {
{
name = "pickem",
label = "Mine Rocks"
}
},
vars = {
whatever = "whatever"
}
})
end
end)
onInteract = function(targetName,optionName,vars,entityHit)
if optionName == "pickem" then
TriggerEvent("pick:rock")
end
end
That’s usually an issue with the function that is being called. Look at pick:rock as the issue most likely.
Maybe forgot to register it? Also, if it’s in the same script just turn it into a local function so you don’t have to register a net event.
Ya event is there, was using it with bt-target fine.
i think you dont need to call it every frame, just delete the while loop and try it again
why make us run two copys of the same script. why not update the main BT git with a pull?