meta-hub / fivem-target

Mostly re-written version of bt-target.
15 stars 7 forks source link

why not update bt #4

Closed ElusionPDX closed 3 years ago

ElusionPDX commented 3 years ago

why make us run two copys of the same script. why not update the main BT git with a pull?

meta-hub commented 3 years ago

They simply don't function the same.

ElusionPDX commented 3 years ago

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 .

Senlar commented 3 years ago

Request access to edit the script or request that the script author provides fivem-target support.

ElusionPDX commented 3 years ago

well trying to update stuff to it and its just crashing clients. Am i just calling your function wrong ? image

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
Senlar commented 3 years ago

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.

ElusionPDX commented 3 years ago

Ya event is there, was using it with bt-target fine.

JericoFX commented 3 years ago

i think you dont need to call it every frame, just delete the while loop and try it again