Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Request QB-Target Needing Help, (Globale Players Options) (Solution has be'n Found!)

Anonymouse

Gold Elite
Joined
Aug 12, 2021
Messages
136
Reaction score
2,204
Points
316
I cant figure out how players can give contacts and vehicle keys to eachother by using QB-Target

<-- this script. Cant figure it out anyone knows or is good with QB-Target and can help me out ? i found something in the template but it seems not working. Kinda annoying.
 
Last edited:

falcon164

Bronze Elite
Joined
Oct 26, 2021
Messages
13
Solutions
1
Reaction score
9
Points
166
Location
South Carolina
I am no pro by any means but this Is what I came up with for giving contact details as an example. I just look in whatever resource I am trying to use and find the event it triggers.
Here is also one I use to allow police to search via the target.




options = {
{
type = "client",
event = "qb-phone:client:GiveContactDetails",
icon = 'fas fa-phone',
label = 'Give Contact Details',
item = 'phone',

},
{
type = "client",
event = "police:client:SearchPlayer",
icon ='fas fa-id-card',
label = 'Search Person',
job = 'police',
 

Anonymouse

Gold Elite
Joined
Aug 12, 2021
Messages
136
Reaction score
2,204
Points
316
I am no pro by any means but this Is what I came up with for giving contact details as an example. I just look in whatever resource I am trying to use and find the event it triggers.
Here is also one I use to allow police to search via the target.




options = {
{
type = "client",
event = "qb-phone:client:GiveContactDetails",
icon = 'fas fa-phone',
label = 'Give Contact Details',
item = 'phone',

},
{
type = "client",
event = "police:client:SearchPlayer",
icon ='fas fa-id-card',
label = 'Search Person',
job = 'police',
Thanks helped allot! Needed to add some but it helped me allot! Thats a thumbs up for you !


if some one else needs help with this this is the right command.


Config.GlobalPlayerOptions = {
options = {
{
type = "client",
event = "qb-phone:client:GiveContactDetails",
icon = 'fas fa-phone',
label = 'Give Contact Details',
item = 'phone',

},
{
type = "client",
event = "police:client:SearchPlayer",
icon ='fas fa-id-card',
label = 'Search Person',
job = 'police',
},
distance = 4.0
},
}

Enjoy !
 

sunsfuns

Member
Joined
Apr 25, 2022
Messages
19
Reaction score
0
Points
166
Location
riga
Thanks helped allot! Needed to add some but it helped me allot! Thats a thumbs up for you !


if some one else needs help with this this is the right command.


Config.GlobalPlayerOptions = {
options = {
{
type = "client",
event = "qb-phone:client:GiveContactDetails",
icon = 'fas fa-phone',
label = 'Give Contact Details',
item = 'phone',

},
{
type = "client",
event = "police:client:SearchPlayer",
icon ='fas fa-id-card',
label = 'Search Person',
job = 'police',
},
distance = 4.0
},
}

Enjoy !
not working
 

TheMoneyMaker

Member
Joined
May 12, 2022
Messages
3
Reaction score
0
Points
156
Location
Arab
options = { -- This is your options table, in this table all the options will be specified for the target to accept
{ -- This is the first table with options, you can make as many options inside the options table as you want
type = "client", -- This specifies the type of event the target has to trigger on click, this can be "client", "server", "command" or "qbcommand", this is OPTIONAL and will only work if the event is also specified
event = "Test:Event", -- This is the event it will trigger on click, this can be a client event, server event, command or qbcore registered command, NOTICE: Normal command can't have arguments passed through, QBCore registered ones can have arguments passed through
icon = 'fas fa-example', -- This is the icon that will display next to this trigger option
label = 'Test', -- This is the label of this option which you would be able to click on to trigger everything, this has to be a string
targeticon = 'fas fa-example', -- This is the icon of the target itself, the icon changes to this when it turns blue on this specific option, this is OPTIONAL
item = 'handcuffs', -- This is the item it has to check for, this option will only show up if the player has this item, this is OPTIONAL
action = function(entity) -- This is the action it has to perform, this REPLACES the event and this is OPTIONAL
if IsPedAPlayer(entity) then return false end -- This will return false if the entity interacted with is a player and otherwise returns true
TriggerEvent('testing:event', 'test') -- Triggers a client event called testing:event and sends the argument 'test' with it
end,
canInteract = function(entity, distance, data) -- This will check if you can interact with it, this won't show up if it returns false, this is OPTIONAL
if IsPedAPlayer(entity) then return false end -- This will return false if the entity interacted with is a player and otherwise returns true
return true
end,
job = 'police', -- This is the job, this option won't show up if the player doesn't have this job, this can also be done with multiple jobs and grades, if you want multiple jobs you always need a grade with it: job = {["police"] = 0, ["ambulance"] = 2},
gang = 'ballas', -- This is the gang, this option won't show up if the player doesn't have this gang, this can also be done with multiple gangs and grades, if you want multiple gangs you always need a grade with it: gang = {["ballas"] = 0, ["thelostmc"] = 2},
citizenid = 'JFD98238', -- This is the citizenid, this option won't show up if the player doesn't have this citizenid, this can also be done with multiple citizenid's, if you want multiple citizenid's there is a specific format to follow: citizenid = {["JFD98238"] = true, ["HJS29340"] = true},
}
},
distance = 2.5
 

WDNMD1212

Member
Joined
May 13, 2022
Messages
7
Reaction score
0
Points
146
Location
New zealand
I cant figure out how players can give contacts and vehicle keys to eachother by using QB-Target

<-- this script. Cant figure it out anyone knows or is good with QB-Target and can help me out ? i found something in the template but it seems not working. Kinda annoying.I
I also stuck in here as well, Have you know how to write the code
 
Top