qb-target icon indicating copy to clipboard operation
qb-target copied to clipboard

[BUG] Error executing native

Open rxnm opened this issue 11 months ago • 7 comments

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 Screenshot_1

rxnm avatar Mar 06 '24 07:03 rxnm

I have the same problem i get that native error with the new version off qb-truckrobbery.

RoykeHD avatar Mar 11 '24 18:03 RoykeHD

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

bo0tych33ks avatar Mar 26 '24 23:03 bo0tych33ks

i have the same issue recently i switched to the new one

Realturnpoint avatar Apr 03 '24 17:04 Realturnpoint

Also got the same issue

EmZ44 avatar May 10 '24 16:05 EmZ44

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.

rxnm avatar Jun 16 '24 19:06 rxnm

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

telmoalves123123 avatar Jun 18 '24 13:06 telmoalves123123

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.

fix.txt

If you want debugging to see where are the problems IF there are any then add this: print("Entity Hit Model: ", GetEntityModel(entityHit))

rxnm avatar Jul 25 '24 06:07 rxnm