fivem icon indicating copy to clipboard operation
fivem copied to clipboard

BreakOffVehicleWheel native doesn't delete wheel for other clients

Open CeebDev opened this issue 3 months ago • 8 comments

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

  • Need 2 clients at least
  • Execute this on the vehicle owner
local vehicle = GetVehiclePedIsIn(PlayerPedId())
BreakOffVehicleWheel(vehicle, 0, false,  true, false, false)
  • Wheel is deleted for owner but not for other clients

Importancy

Slight inconvenience

Area(s)

FiveM, Natives

Specific version(s)

FiveM b3095 (canary), Server b7930 windows

Additional information

No response

CeebDev avatar May 05 '24 14:05 CeebDev

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

JericoFX avatar May 05 '24 17:05 JericoFX

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

PsychoShock avatar May 05 '24 20:05 PsychoShock

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 ?

CeebDev avatar May 06 '24 08:05 CeebDev

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

ahcenezdh avatar May 06 '24 22:05 ahcenezdh

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

Laikker avatar May 07 '24 07:05 Laikker

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.

JericoFX avatar May 07 '24 13:05 JericoFX

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

ahcenezdh avatar May 15 '24 20:05 ahcenezdh

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

Disquse avatar May 16 '24 17:05 Disquse