[SUPPORT] Target not working for some props, with multiple scripts
Swahgner opened this issue · 7 comments
Problem:
Tried using ps-drugprocessing, and ps-signrobbery, in drugprocessing only cocaine field will not work, in signrobbery, none of the props is targetable (I have tried replacing a prop for the sign with a shopping cart, which works)
Wanted Outcome:
Show the eye
Current Point:
I figure it is a qb-target issue, since the same issue happens on multiple scripts. I thought it was a problem with custom models, but signrobbery uses standard props, which does not work.
Screenshots:
From ps-signrobbery
Additional context:
[EDIT]
Just tried changing the model in ps-signrobbery of one of the signs to a trolley, as you can see, it works with that model
-- Original code
exports['qb-target']:AddTargetModel('prop_sign_road_02a', {
options = {
{
type = 'client',
event = "qb-signrobbery:client:YieldSign",
icon = 'fas fa-user-secret',
label = 'Steal Sign',
}
},
distance = 4.0,
})
-- Altered to trolley
exports['qb-target']:AddTargetModel("prop_skid_trolley_2", {
options = {
{
type = "client",
event = "qb-signrobbery:client:DontBlockIntersectionSign",
icon = "fas fa-user-secret",
label = "Steal Sign",
}
},
distance = 4.0,
})
Problem: Tried using ps-drugprocessing, and ps-signrobbery, in drugprocessing only cocaine field will not work, in signrobbery, none of the props is targetable (I have tried replacing a prop for the sign with a shopping cart, which works)
Wanted Outcome: Show the eye
Current Point: I figure it is a qb-target issue, since the same issue happens on multiple scripts. I thought it was a problem with custom models, but signrobbery uses standard props, which does not work.
Screenshots: From ps-signrobbery
Additional context: [EDIT] Just tried changing the model in ps-signrobbery of one of the signs to a trolley, as you can see, it works with that model
-- Original code exports['qb-target']:AddTargetModel('prop_sign_road_02a', { options = { { type = 'client', event = "qb-signrobbery:client:YieldSign", icon = 'fas fa-user-secret', label = 'Steal Sign', } }, distance = 4.0, })-- Altered to trolley exports['qb-target']:AddTargetModel("prop_skid_trolley_2", { options = { { type = "client", event = "qb-signrobbery:client:DontBlockIntersectionSign", icon = "fas fa-user-secret", label = "Steal Sign", } }, distance = 4.0, })
Use this website for getting correct prop IDs - https://gta-objects.xyz/
The prop id you have entered for the road sign is wrong , it works , always make sure the prop id correct!
Can you tell me what the correct id is then? I just used the link you sent me, and this is what I found:
This is my code:
exports['qb-target']:AddTargetModel('prop_sign_road_02a', {
options = {
{
type = 'client',
event = "qb-signrobbery:client:YieldSign",
icon = 'fas fa-user-secret',
label = 'Steal Sign',
}
},
distance = 4.0,
})
As far as I can see, those are identical?
I just tried with this code:
exports['qb-target']:AddTargetModel('prop_sign_road_03e', {
options = {
{
type = 'client',
event = "qb-signrobbery:client:testing",
icon = 'fas fa-user-secret',
label = 'X it!',
}
},
distance = 4.0,
})
exports['qb-target']:AddTargetModel('prop_skid_trolley_2', {
options = {
{
type = 'client',
event = "qb-signrobbery:client:testing",
icon = 'fas fa-user-secret',
label = 'X it!',
}
},
distance = 4.0,
})
exports['qb-target']:AddTargetModel('prop_rub_couch01', {
options = {
{
type = 'client',
event = "qb-signrobbery:client:testing",
icon = 'fas fa-user-secret',
label = 'X it!',
}
},
distance = 4.0,
})
(The event is simply just printing a debug message to determine if it will run)
The first with the sign doesn't work, but the trolley and the couch works like a charm
I just tried with this code:
exports['qb-target']:AddTargetModel('prop_sign_road_03e', { options = { { type = 'client', event = "qb-signrobbery:client:testing", icon = 'fas fa-user-secret', label = 'X it!', } }, distance = 4.0, }) exports['qb-target']:AddTargetModel('prop_skid_trolley_2', { options = { { type = 'client', event = "qb-signrobbery:client:testing", icon = 'fas fa-user-secret', label = 'X it!', } }, distance = 4.0, }) exports['qb-target']:AddTargetModel('prop_rub_couch01', { options = { { type = 'client', event = "qb-signrobbery:client:testing", icon = 'fas fa-user-secret', label = 'X it!', } }, distance = 4.0, })(The event is simply just printing a debug message to determine if it will run)
The first with the sign doesn't work, but the trolley and the couch works like a charm
Seems to be working fine to me , please make sure you have the latest release of qb-target v5.3.9 from the github
I just tried with this code:
exports['qb-target']:AddTargetModel('prop_sign_road_03e', { options = { { type = 'client', event = "qb-signrobbery:client:testing", icon = 'fas fa-user-secret', label = 'X it!', } }, distance = 4.0, }) exports['qb-target']:AddTargetModel('prop_skid_trolley_2', { options = { { type = 'client', event = "qb-signrobbery:client:testing", icon = 'fas fa-user-secret', label = 'X it!', } }, distance = 4.0, }) exports['qb-target']:AddTargetModel('prop_rub_couch01', { options = { { type = 'client', event = "qb-signrobbery:client:testing", icon = 'fas fa-user-secret', label = 'X it!', } }, distance = 4.0, })(The event is simply just printing a debug message to determine if it will run)
The first with the sign doesn't work, but the trolley and the couch works like a charmSeems to be working fine to me , please make sure you have the latest release of qb-target v5.3.9 from the github
![]()
![]()
That did it!
I thought I had the latest version, but I must have downloaded a wrong one
Thank you for the help!