Comments (9)
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.
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.
@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.
could you explain what you mean you need to pass 2 variables ?
from qb-target.
so my current event is openmenu(v.job, v.grade)
how would i use this?
from qb-target.
instead of v.job, v.grade
make it QBCore.Functions.GetPlayerData().job.name, QBCore.Functions.GetPlayerData().job.grade.level
from qb-target.
instead of
v.job, v.grade
make itQBCore.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.
- You can't trigger a function outside of bt-target, only an event and now also a command.
- 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.
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)
- push to talk HOT 1
- [FEATURE] Update Examples & Templates HOT 1
- AddTargetModel doesn't work on trees props - [SUPPORT] HOT 1
- [SUPPORT] HOT 1
- HELP! script error: @qb-target/client.lua:31: attempt to call a nil value (global 'Load') [SUPPORT] HOT 1
- Relocation HOT 1
- Don't use this HOT 10
- [SUGGESTION] HOT 1
- [SUPPORT] HOT 2
- can't open options HOT 2
- [Peds Duplicate]
- function AddGlobalPlayer HOT 1
- [SUPPORT]
- need a support for an issue HOT 4
- [BUG] Font Awesome Eye Not Showing HOT 29
- [BUG] Error spam latest update HOT 8
- Global Players options not working
- [BUG]Unsupported Operation HOT 2
- [BUG] Error executing native HOT 6
- Im getting an error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qb-target.