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

0xF9904D11F1ACBEC3 Native problem #2855

Open
someone005 opened this issue Oct 10, 2024 · 0 comments
Open

0xF9904D11F1ACBEC3 Native problem #2855

someone005 opened this issue Oct 10, 2024 · 0 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@someone005
Copy link
Contributor

What happened?

I found out that there will be an error thrown to the console after using native GET_HUD_SCREEN_POSITION_FROM_WORLD_POSITION in command's handler function, that is called after pressing button registered in REGISTER_KEY_MAPPING. Instead of using this native stright in command function, you have to create a thread outside or inside command handler.

Example Code:

RegisterCommand('+testnative', function()
    local coords = GetEntityCoords(PlayerPedId())
    local onScreen, x, y = GetHudScreenPositionFromWorldPosition(coords.x, coords.y, coords.z)
end)

RegisterKeyMapping('+testnative', 'test', 'keyboard', 'j')

image

Expected result

There shouldn't be any error thrown

Reproduction steps

  1. Add code I wrote in description to existing script (or create a new one)
  2. Start/Restart the script
  3. Press J on keyboard

Importancy

There's a workaround

Area(s)

Natives

Specific version(s)

FiveM: 10236/beta FXServer: b9875 Game Build: 3095

Additional information

No response

@someone005 someone005 added bug triage Needs a preliminary assessment to determine the urgency and required action labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

1 participant