qb-target
qb-target copied to clipboard
[BUG] Error executing native
Describe the bug Since updating to the latest qb-target I am getting this error sometimes when I try to use the target on something, it doesn't happen always though, it is kind of on and off.
Expected behavior How it is meant to work as intended and how it worked well before, it still works well but just spams these errors from time to time.
Screenshots
I have the same problem i get that native error with the new version off qb-truckrobbery.
Same issue with other scrips but only on certain things and my server.cfg is loading qb-target before any other scripts so its not that
i have the same issue recently i switched to the new one
Also got the same issue
I fixed it, line 119 I changed this:
entityHit = HasEntityClearLosToEntity(entityHit, playerPed, 7) and entityHit
To this:
entityHit = GetEntityPlayerIsFreeAimingAt(PlayerId(entityHit, playerPed, 7)) and entityHit
Now it works fine. It seem that it broke around game version 3095.
I fixed it, line 119 I changed this:
entityHit = HasEntityClearLosToEntity(entityHit, playerPed, 7) and entityHit
To this:
entityHit = GetEntityPlayerIsFreeAimingAt(PlayerId(entityHit, playerPed, 7)) and entityHit
Now it works fine. It seem that it broke around game version 3095.
WORKED FOR ME !! TY
I fixed it, line 119 I changed this:
entityHit = HasEntityClearLosToEntity(entityHit, playerPed, 7) and entityHit
To this:
entityHit = GetEntityPlayerIsFreeAimingAt(PlayerId(entityHit, playerPed, 7)) and entityHit
Now it works fine. It seem that it broke around game version 3095.
This does fix the error, but I just realized that it also breaks the usage of the ATMs at Fleeca on (Vespucci Boulevard). So a propper fix is still needed.
I have another fix, still testing it though, I rewrote the whole function from lines 103-133 here:
Like I said, still testing it, those ATMs I said previously that didn't work, they work with this! also no errors so far.
Edit: had to attach the file which has the fix as the code box was messing up.
If you want debugging to see where are the problems IF there are any then add this: print("Entity Hit Model: ", GetEntityModel(entityHit))