citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.41k stars 2.01k forks source link

BreakOffVehicleWheel native doesn't delete wheel for other clients #2498

Open CeebDev opened 2 months ago

CeebDev commented 2 months ago

What happened?

When using BreakOffVehicleWheel native with the param deleteWheel at true it delete the wheel for the initiator of the native but not for other clients

image image

Expected result

If deleteWheel is set to true, it should delete wheel for every clients

Reproduction steps

Importancy

Slight inconvenience

Area(s)

FiveM, Natives

Specific version(s)

FiveM b3095 (canary), Server b7930 windows

Additional information

No response

JericoFX commented 2 months ago

Try to use state bags, with the doors happend the same

PsychoShock commented 2 months ago

This is not a issue, native is not networked. Like @JericoFX said, you can use state bags wich is made for that case.

CeebDev commented 2 months ago

This is not a issue, native is not networked. Like @JericoFX said, you can use state bags wich is made for that case.

But wheel is removed from the vehicle, so this is networked but not the wheel deletion ?

ahcenezdh commented 2 months ago

I'm not sure but looks like this native is networked? https://github.com/citizenfx/fivem/blob/9f2ea4c6e8eb8a3a3b26b4a8bc99866579d2352f/code/components/extra-natives-five/src/VehicleExtraNatives.cpp#L1657C4-L1658C1

Laikker commented 2 months ago

I'm not sure but looks like this native is networked? https://github.com/citizenfx/fivem/blob/9f2ea4c6e8eb8a3a3b26b4a8bc99866579d2352f/code/components/extra-natives-five/src/VehicleExtraNatives.cpp#L1657C4-L1658C1

From tests i made, It seems that when the last paremeter is true, the native has no effect on network entities that are not owned

JericoFX commented 2 months ago

same thing happend with this issue https://github.com/citizenfx/fivem/issues/1858, my solution was using state bags to ensure that every player recive the correct data.

ahcenezdh commented 2 months ago

This is weird, @Disquse does this native is networked by default? or we have to use statebags to sync it

Disquse commented 2 months ago

We're not altering the game's behavior at this point. From what I remember most of the functionality was networked.