Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error executing native #202

Open
rxnm opened this issue Mar 6, 2024 · 7 comments
Open

[BUG] Error executing native #202

rxnm opened this issue Mar 6, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@rxnm
Copy link

rxnm commented Mar 6, 2024

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 rxnm added the bug Something isn't working label Mar 6, 2024
@RoykeHD
Copy link

RoykeHD commented Mar 11, 2024

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

@bo0tych33ks
Copy link

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

@Realturnpoint
Copy link

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

@EmZ44
Copy link

EmZ44 commented May 10, 2024

Also got the same issue

@rxnm
Copy link
Author

rxnm commented Jun 16, 2024

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.

@telmoalves123123
Copy link

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

@rxnm
Copy link
Author

rxnm commented Jul 25, 2024

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants