GithubHelp home page GithubHelp logo

Comments (9)

Archangelza1 avatar Archangelza1 commented on July 17, 2024

Here is a box zonee example :)

-- the name of the table and the name parameter can be the same
    ["string"] = { -- has to be unique
       name = "string", -- has to be unique
       coords = vector3(-206.16, -1341.66, 34.89), -- example coords
       length = 1.3, -- float value
       width = 0.3, -- float value
       heading = 0, -- integer
       debugPoly = true, -- boolean, it makes a green box if true
       minZ = 33.89, -- float value
       maxZ = 36.18, -- float value
         options = {
            {
                type = "client", -- client, server, function (only function in bt-target), action (if you use this you can make the action parameter a function, this will get the entity you're looking at sent to so you can check on that)
                event = "string",
                parameters = {}, -- put anything you want inside this to get it through an event get it with: data.parameters, same goes for any other option here, you can get them too
                icon = "fas fa-circle", -- an example one, get it from fontawesome.com
                label = "string",
                job = "string" -- or a table if you have more jobs, like this {["police"] = 1, ["ambulance"] = 3}
            },
        },
        distance = 2.0 -- float value in gta units, 1.8 is mostly against an object
    },

from qb-target.

mrdeano avatar mrdeano commented on July 17, 2024

Here is a box zonee example :)

-- the name of the table and the name parameter can be the same
    ["string"] = { -- has to be unique
       name = "string", -- has to be unique
       coords = vector3(-206.16, -1341.66, 34.89), -- example coords
       length = 1.3, -- float value
       width = 0.3, -- float value
       heading = 0, -- integer
       debugPoly = true, -- boolean, it makes a green box if true
       minZ = 33.89, -- float value
       maxZ = 36.18, -- float value
         options = {
            {
                type = "client", -- client, server, function (only function in bt-target), action (if you use this you can make the action parameter a function, this will get the entity you're looking at sent to so you can check on that)
                event = "string",
                parameters = {}, -- put anything you want inside this to get it through an event get it with: data.parameters, same goes for any other option here, you can get them too
                icon = "fas fa-circle", -- an example one, get it from fontawesome.com
                label = "string",
                job = "string" -- or a table if you have more jobs, like this {["police"] = 1, ["ambulance"] = 3}
            },
        },
        distance = 2.0 -- float value in gta units, 1.8 is mostly against an object
    },

Thanks
will test to see if it works :D

from qb-target.

mrdeano avatar mrdeano commented on July 17, 2024

@Archangelza1 can you please explan the parameters ?? please

in my code i need to pass 2 verables v.job and v.grade

from qb-target.

Archangelza1 avatar Archangelza1 commented on July 17, 2024

could you explain what you mean you need to pass 2 variables ?

from qb-target.

mrdeano avatar mrdeano commented on July 17, 2024

so my current event is openmenu(v.job, v.grade)

how would i use this?

from qb-target.

BerkieBb avatar BerkieBb commented on July 17, 2024

instead of v.job, v.grade make it QBCore.Functions.GetPlayerData().job.name, QBCore.Functions.GetPlayerData().job.grade.level

from qb-target.

mrdeano avatar mrdeano commented on July 17, 2024

instead of v.job, v.grade make it QBCore.Functions.GetPlayerData().job.name, QBCore.Functions.GetPlayerData().job.grade.level

so would it look like this?

["string"] = { -- has to be unique
   name = "string", -- has to be unique
   coords = vector3(-206.16, -1341.66, 34.89), -- example coords
   length = 1.3, -- float value
   width = 0.3, -- float value
   heading = 0, -- integer
   debugPoly = true, -- boolean, it makes a green box if true
   minZ = 33.89, -- float value
   maxZ = 36.18, -- float value
     options = {
        {
            type = "client", -- client, server, function (only function in bt-target), action (if you use this you can make the action parameter a function, this will get the entity you're looking at sent to so you can check on that)
            event = "string",
            parameters = {ESX.GetPlayerData().job.name, ESX.GetPlayerData().job.grade.level}, -- put anything you want inside this to get it through an event get it with: data.parameters, same goes for any other option here, you can get them too
            icon = "fas fa-circle", -- an example one, get it from fontawesome.com
            label = "string",
            job = "string" -- or a table if you have more jobs, like this {["police"] = 1, ["ambulance"] = 3}
        },
    },
    distance = 2.0 -- float value in gta units, 1.8 is mostly against an object
},

and in the event function that im trying to use what would i put here to get the prams? function(WHAT WOULD I PUT HERE?)

from qb-target.

BerkieBb avatar BerkieBb commented on July 17, 2024
  1. You can't trigger a function outside of bt-target, only an event and now also a command.
  2. That's not what I told you and it's grade not grade.level for ESX, you don't have to send parameters, just get the job and grade inside the function

from qb-target.

mrdeano avatar mrdeano commented on July 17, 2024

sorry i must of miss put what i was trying to say

so this is the event im trying to use with this bt-target

AddEventHandler("core_jobutilities:openBossMenu",function(j, l)
    ESX.TriggerServerCallback("core_jobutilities:getBossMenuData",function(grades, employees, fund, gradename)
            if Config.BossMenuUsers[gradename] ~= nil and job == j then
                SetNuiFocus(true, true)
                SendNUIMessage(
                    {
                        type = "openBoss",
                        job = {job = job, grade = grade},
                        employees = employees,
                        grades = grades,
                        fund = fund,
                        bossJob = j,
                        bossLabel = l,
                        perms = Config.BossMenuUsers[gradename]
                    }
                )
            else
                SendTextMessage(Config.Text["cant_access_bossmenu"])
            end
        end,j)
end)

so j would be job and l would be lable of the job

so would i need to use this bt-target by calling there job?

or how could i do it?

Thanks

from qb-target.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.