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

Synchronization issue with helicopter blade breaking using the native SetHeliMainRotorHealth #2997

Open
ImBaphomettt opened this issue Dec 12, 2024 · 2 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@ImBaphomettt
Copy link

ImBaphomettt commented Dec 12, 2024

What happened?

Synchronization issue with helicopter blade breaking using the native SetHeliMainRotorHealth

Entity owner's POV (driver): https://streamable.com/oonw7j
Another player's POV: https://streamable.com/2ab34k

Expected result

That the rotors are correctly synchronized for the helicopter driver.

Reproduction steps

  1. Create a networked vehicle client-side (e.g., a Frogger helicopter) (this issue might also occur with server-side vehicle creation ?).
  2. Use the native function SetHeliMainRotorHealth to break the helicopter's rotor blades (the same issue may also occur with SetHeliTailRotorHealth ??).

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer

Specific version(s)

FiveM 3095 / FXServer-master SERVER v1.0.0.11840 win32

Additional information

I remain available for any additional information or to answer your questions if needed.

@ImBaphomettt ImBaphomettt added bug triage Needs a preliminary assessment to determine the urgency and required action labels Dec 12, 2024
@AvarianKnight
Copy link
Contributor

I'm confused on what the actual issue is here, it looks like you try to call it on a player (who notably isn't the entity owner) and it doesn't sync to the driver (who is the entity owner).

That would be expected behavior, non-owning entities can't change sync nodes for an entity not owned by them

@ImBaphomettt
Copy link
Author

I'm confused on what the actual issue is here, it looks like you try to call it on a player (who notably isn't the entity owner) and it doesn't sync to the driver (who is the entity owner).

That would be expected behavior, non-owning entities can't change sync nodes for an entity not owned by them

Oh yes, I should have specified that.

This is an administrative tool designed for playful interactions with players. Specifically, it triggers a server-side event that retrieves the owner of the entity to apply this native to the vehicle. In other words, it’s as if the client (the driver) was executing this action directly. I should have clarified this earlier, and I apologize

RegisterCommand("test", function()
    local ped = PlayerPedId();
    if (not ped) then
        return print('ped not found')
    end
    local entity = GetVehiclePedIsIn(ped, false)
    if (not DoesEntityExist(entity)) then
        return print('player not in vehicle')
    end
    SetHeliMainRotorHealth(entity, 0)
end)

If you execute this as the driver, you will notice the same issue as shown in the videos.

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

2 participants